I would like to realize an iPhone app with Facebook OpenGraph to push user activities directly in Facebook (for this part, it's OK). BUT, I would like to show friends activities for the same verb. In dev Facebook documentation, I don't find API to get friends activities...
Any ideas ?
GET /me/{namespace}:{action-type}
GET /me/{namespace}:{action-type}/{object-type}
Don't forget to ask for the permissions firends_actions:namespace
Namespace = namespace of your app
Find friends with the app (this gives you a nice tidy list)
Option 1. Use Fql.query so you can apply filters and get back only what you need...
Fql.query POST
SELECT uid, name, pic from user where uid in (select uid2 from friend where uid1=me()) and is_app_user=1", #"query
option 2. Use opengraph and get back a mother list of friends with their ID any fields you want to read (installed status shown)
GET me/friends&fields=installed
Then use the Friends list to download their {action-type} executions
Option1. Enumerate through your friends activity with this and then bare it all:
GET /friend_id/{namespace}:{action-type}
option 2. Force the user to browse the list of friends with the app...
They choose the friend and then ->
GET /friend_id/{namespace}:{action-type}
They get a list of that users last 25 actions.
It's how instagram works when you browse.
The thing we all want is to just have a feed with the last 25-50 actions by friends. Just like the activity plugin. At this point it seems like there is no way to get it. I spent hours searching and everyone ends up saying you need to do it manually on your own server. I wouldn't be surprised if this activity function is added to the graph sdk eventually. It's a reasonable request.
Related
I want to invite Facebook friends the way Rounds iOS app work (i.e. show the list of Facebook friends in native UI and once the user taps 'Send Invites', i show the Request Dialog with the select friends and the user only press send to send the invites). This can be done using
FBWebDialogs.presentRequestsDialogModallyWithSession(
nil,
message:"Message",
title:nil,
parameters:["app_id" : APP_ID, "to" : FRIENDS_IDs]) {
result, url, error in
//Do whatever
}
The problem here is that the only two ways i can use to get the friend ids is:
1- making a graph request using /me/invitable_friends which is avaiable only for games.
2- the other is to use /me/friends BUT it returns only the friends that have authorized your app not the complete list of friends.
What i want to do is already done in another app called Rounds and also it is not categorized as game.
https://developers.facebook.com/docs/apps/faq#invite_to_app
You are supposed to use the Message Dialog on iOS to invite friends. There is no need to get the whole friendlist for that, the user can just select his friends in the Dialog. You can´t get the whole friendlist anyway if your App does not have a Canvas implementation and if your App is not a game. Of course there´s also taggable_friends, but that one is for tagging only.
Btw, those other Apps where this works are most likely old v1.0 Apps. It will stop working for them after April 2015.
I had a question concerning the Facebook iOS SDK that has been troubling me ever since i started my iOS project so I thought I could post it here to see if any of you had wisdom to share on this matter.
For my Facebook connected app to function properly I need to have access to the Facebook user's complete friend list along with their names, ids and profile pictures. After some intensive research I was surprised to learn that in version 2.0 of the Graph API Facebook has made it so that you can only retrieve a friend list of your friends who are currently using the app and have approved the app. This kind of data doesn't really work for my app as the main point is that you are met by your friend list as opposed to an empty list with only a few people who have approved the app.
My question is if there is any possible way for me to have access to the user's full friend list and display it in a table view with their profile picture without every single one of them having to approve the app. I don't mind if it is a complicated solution. The reason I ask this is because i have seen several apps that can fetch full friends lists such as:
http://www.connect.com
and
http://www.birthdayboardapp.com
and they must have found a way to do it as the way Connect displays the user's friend list is exactly the way I would like to do it i.e. in an iOS contacts app style way.
I would be grateful for any guidance or solutions,
Thanks Again!
P.S. Here are some questions I have previously looked at but do not suggest possible workarounds
Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
Get ALL User Friends Using Facebook Graph API - Android
There are no workarounds, if it works in some other App then it just means that they are still using a Facebook App created before end of April 2014. They will stop getting the full friendlist after April 2015, when v1.0 Apps will get upgraded.
There are ways to get the whole friendlist like invitable_friends and taggable_friends, but those endpoints are supposed to get used for very specific tasks (for inviting in games and for tagging).
In my iOS application, I am trying to implement Facebook but am running into a problem. I currently have the user logging in as well as I have implemented the friend picker. I am looking to now have it so when the user taps a friend it will show their status(last post in their feed. e.g.."In NYC on broadway!"). I did a lot of research online but am getting very confused. If someone could point me to good tutorial or could just explain this that would be great. I believe I have to use open graph but other then Facebook's tutorials I can't find any. Are there any tutorials other than on FB?
You can access a user's feed by calling /<userId>/feed (https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Ffeed). Then, look for the first element on data array where "type": "status".
I think that the answer you're looking for is here, with the exception that you'll basically (I assume) display a list of friends with their profile pic. When clicking on the profile pic the user will see their status? Or you could try to do it all in once (friend name, pic, friend's last status). The facebook developers url they refer to in that post is here
I am new in handling apps that will be connecting with Facebook.
I want to let my user log in my app with Facebook account and be able to send something, for example, a gift to their Facebook friends.
I want to get the user's friends list and which is very easy by using FBFriendPickerViewController. However, I want to have an effect that if their Facebook friend(s) is/are also using my app, the app icon will be shown at the right hand side of the user table cell (Just like some Phone Contact lists will show if the contact has Whatsapp/ Google+)
I have been searching through sites but still find nothing about this.
So my question is, is there any "official" way (using Facebook SDK method) to show the icon?
Or I have been thinking of another approach is that, I first get the friend list and then saved it, with the information that whether the "friend" is using my app or not. Then I create a custom friend picker view and check the condition to enable/disable the visibility of the app icon.
I can get the information by using approached of using GraphAPI fields or using external database, for which are mentioned in this , this and this .....
Anybody help?
Ok I end up with customizing my own table view... : )
How do I trigger a programmatic post to a specific person's Facebook wall so that it looks like this (but replace GO TRY IT ON with my app):
I do not want this to be a generic post to the world. I want this targeted to the specific user's wall whom I specify. I want to include a specific message. I already have social discovery for my app enabled (meaning that I can see my app when I search facebook on my iPhone, and I see it in my list of apps such that I can tap the row and launch my app from facebook).
Looks like you want to familiarize yourself with the concept of the Open Graph -> https://developers.facebook.com/docs/opengraph/
product is obviously an object defined in that apps open graph settings, and suggesting is an action that can be undertaken with products.
So what you've shown us in this picture is not a normal post, it's the publication message of an Open Graph action.
But I'm not aware of any simple way to make this publication visible only to one user. The general visibility is set by the user in the auth dialog for your app. I don't know if there's a way to further restrict visibility for a single action publication, maybe by dynamically creating a friendlist with only that one user in it or something …