Retrieving friends' status updates from Facebook Graph API - facebook

I am trying to retrieve a list of friends' status updates for an app I'm making. I'm essentially looking for the data that's in NewsFeed on Facebook.com
I'm currently using the /<user id>/home endpoint, which does return friends' posts, but they are all shared links, not status updates. I'm specifically looking for status updates (in FB Graph terminology, the Post status_type would be mobile_status_update. Here's the API reference: https://developers.facebook.com/docs/graph-api/reference/v2.2/post/
I could do this with FQL, but that's being deprecated so I don't want to rely on it. Anyone know how I can do this with the Graph API?
I could first grab friend IDs and then query for the status updates of those friends, but this would give me statuses that are not of interest to the user. I want a list of new and meaningful status updates from a user's friends.

That's no longer possible with Graph API v2.0 or upwards, because the friends permissions have been removed. It's no longer possible to request the friends_status permission which you'd need.
See
https://developers.facebook.com/docs/apps/changelog#v2_0_permissions

Related

Retrieve all liked objects from Facebook Graph API

Is it possible to get a list of all liked objects using the Graph API? I want to save a list of any articles (ie. items with URLs) the user has liked (say, in the past week). I've tried:
/me/likes - this is liked pages only, not other items
/me/feed - this is posts by the user only, not others
/me/home - this might be possible, but seems to be deprecated
If I understand what you're trying to get correctly, you can probably use the /me/og.likes Graph API endpoint. You'll need the user_likes permission for this.
The /me/likes endpoint returns Facebook Pages that the user likes, while the /me/og.likes endpoint returns any posts/links that the user has Liked (i.e. performed an Open Graph Like action on).

Facebook Graph v2: Request attenting friends from event

With Fb Graph v2 it isn't possible anymore to get a list of friends, {user-id}/friends only will only return any friends who have used (via Facebook Login) the app making the request.
A found solution would be {user-id}/taggable_friends, but this will not return an uid, so it is not possible to compare this list with {event-id}/attendings.
So to me it seems that with die new Open/Closed Graph Api it's not possible anymore to provide this feature to users of my app.
Is there any solution?
After extensive research it turns out that there's no possibiltiy to get attending friends from events with Fb Graph v2. The feature request friends information on FB was removed on purpose in Fb-Graph v2.
Friends request will always only return any friends who have used (via Facebook Login) the app making the request.
Graph API Reference /{user-id}/friends
For furhter information see this so-answer.

Facebook Graph API 2 permission to allow "Stories shared with you: check-ins, photos, status updates and videos"

I trying to write an app to retrieve status updates of my friends on facebook. There are other apps available to do that but I have a concern that its maybe not possible with Graph API 2. That being said as facebook is all about the status updates I would be surprised if that is true.
Looking at other apps that can do what I want to too I think the permission I need is one that results in:
This app needs:
Stories shared with you: check-ins, photos, status updates and videos
Now, I have used the Graph API Explorer and selected all permissions when I generated the token and still when I look in Apps on the main site even the graph explorer doesn't have this permission text.
From what I can see/read it's possible that this feature has been removed and the intention is that now you have to invite all of your friends to share their status with this app too?
Hopefully someone out there knows the permission or can categorically state that it is no longer possible.
With v2.0 of the Graph API, all friends permission have been removed. See https://developers.facebook.com/docs/apps/changelog#v2_0_permissions

fetching list of friends using facebook 2.0

is there any way to fetch list of friends using facebook 2.0 API?
I was reading this upgrade from the API and it seems it is quite difficult to fetch the friends now,
but I have seen 2 permissions
read_friendlist
user_friends
Is their any way to fetch list of friends? and what about the widgets that get friends from facebook, will they go down?
In v2.0 of the Graph API /me/friends returns the user's friends who also use the app. You need to be granted the user_friends permission in order to get even app-using friends.
There is no way in v2.0 to get the full user's friends.
However, you may use the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends API or the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends APIs to get all the user's friends with tokens than can be used for tagging and inviting.
the read_friendlist perm doesn't get you a list of the user's friends, it gets you the list of a user's friendlists which may be used to build a custom privacy selector when publishing stories to Facebook.
As of 4/30/2014, you can only retrieve the friends who also use the app.
There are, however, specific methods for apps in the 'Game' category for inviting friends.
https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends/

What is the difference between feed, posts and statuses in Facebook Graph API?

I'm trying to write a program that retreives a given user's "statuses" (and by statuses I mean the things he posted himself, anything he wrote as I'm mostly interested in textual statuses)
I cannot figure out the difference from the documentation here https://developers.facebook.com/docs/reference/api/user/ so I don't know which connection type to use; feed, posts or statuses
(Another thing I noticed is that statuses requires an access_token while the other 2 require the access_token only for non public stuff)
Thanks
This is documented on the User object of the Graph api. And, as of the Graph API v2.6, there is basically one main endpoint from which you get posts from a user.
/{user-id}/feed includes all the things that a user might see on their own profile feed; this includes, e.g., shared links, checkins, photos and status updates. This also includes posts made by friends on the user's profile.
The following endpoints return subsets of the above:
/{user-id}/posts returns the posts created by the user (on their own profile or the profile of a friend), and it may include any kind of content such as shared links, checkins, photos and status updates.
/{user-id}/tagged returns the posts created by friends and shared on the users's profile.
By default each returned post only includes the story field with a textual description of the post. But you can use the ?fields=... parameter to request as many Post fields as you want.
You'll need the user_posts permission for any of these to work.
The following endpoints are deprecated:
/{user-id}/statuses returns only status updates posted by the user on their own profile. [removed after Graph API v2.3]
/{user-id}/home returns a stream of all the posts created by the user and their friends, i.e. what you usually find on the “News Feed” of Facebook. [removed after Graph API v2.3]
I've found one more difference between /statuses and /posts. /statuses are just text statuses (it doesn't include shared links)
Feed - https://graph.facebook.com/me/feed - gives you the user's feed - meaning the posts he sees when he is visiting facebook (friends important posts) - notice that facebook filters only things it's algorithm marks as significant to the user and not everything.
Status - what the user posts on his own wall
Posts - what the user posts - including on other people's walls