Questions tagged [facebook-graph-api-v2.0]

For using the Graph API v2.0, Your SDK may need updates, or you may need to update the paths you use to call into the graph API.

Changes:

  • In v1.0, there were API endpoints that didn't require an access token to call. In v2.0, all calls to endpoints now require an access token, except for calls to get an object's picture.
  • /me/friends has undergone significant changes. Please see the section above on user IDs and login for details.
  • /me/friendlists has changed. Please see the changes in the login section for more information.
  • The /me/permissions endpoint changed. See the reference for more information.
  • All friend_* permissions have been removed
  • /me/friends returns the user's friends who are also using your app
  • Friends now has a new permission- user_friends

New endpoints:

  • /me/taggable_friends: The new Taggable Friends API. In the past if you wanted to tag friends in a post, you had to get their IDs, names and then pass that information into the post to tag them. With this new API you get a set of tokens that identify friends along with their names and pictures. Using this, it's easy to build a custom tagging interface from your app. If you use this feature, your app will have to go through review before it can tag people in posts or photos. Please note that the tokens returned through this API are not the same as the IDs returned via /me/friends.

  • /me/invitable_friends The new Invitable Friends API. This new API returns a set of people (represented by tokens, names and pictures) in order for you to build your own custom invites interface. Much like the taggable friends interface, the tokens returned here are not the same as the IDs returned via /me/friends and should not be re-used or saved. Using this API does not require review, but is only available to Games on Facebook.com.

  • /me/tagged_places: The new Tagged Places API. This API replaces the v1.0 /me/locations endpoint. The old locations endpoint returned an array of posts, checkins or status messages. The new API returns an array of Facebook Places which a user has been tagged at in photos, videos, statuses and links.

  • /{object-id}?fields=context: The new Social Context API. This API surfaces friends' interactions with objects within your app. You can use on on Pages, Apps, Open Graph Objects and Users to surface social context between the calling user and that object.

  • /me/ids_for_business: The new Business Mapping API. In v2.0 of the API, Facebook will begin to issus app-scoped user IDs when new users login to an instance of your app which is coded against v2.0 of the API. For developers who operate multiple apps (i.e. game developers) the Business Mapping API lets them correlate the same user's app-scoped IDs across the multiple apps owned by the same business. A common use case is for cross-app promotion between games.

Removed endpoints:

  • The /me/username field has been removed.
  • /me/locations has been removed. Please use /me/tagged_places instead.
  • /me/checkins has been removed, along with the user_checkins permission. Please use /me/tagged_places instead
  • /me/questions has been removed, along with the user_questions permission. This also includes /{page-id}/questions, /{group-id}/questions, /{question-id} and /{question-option-id}.
  • /me/subscribers and /me/subscribedto have been removed.
  • /me/username has been removed.
  • /me/notes has been removed.
  • /{page-id}/notes has been removed.
  • /{page-id}/questions has been removed.
  • Public post search is no longer available. (/search?type=post&q=foobar)
  • News Feed search is no longer available (/me/home?q=foobar)

References:

256 questions
8
votes
2 answers

Sending a link with Facebook Message Dialog ignoring all params

I am trying to share/send a link to friends via the new Facebook Message Dialog which was implemented in v2.0. I have been following the direction from the docs: https://developers.facebook.com/docs/ios/share#message-dialog-getting-started and…
7
votes
1 answer

How to connect to the Facebook Graph API from Google Apps Script?

I'm trying to connect to the Facebook Graph API via a Google Apps Script but I'm getting an error I've tried: function myFunction (name) { FB.init({ appId : '{your-app-id}', status : true, xfbml : true, …
user3226932
  • 2,042
  • 6
  • 39
  • 76
7
votes
3 answers

Get Facebook app-scoped user id from global Facebook id, or username

If you have a Facebook, for instance Zuckerbergs user id '4', or username, 'zuck', how do you get the new app-scoped id with Graph v2.0 using the app's access token? Can't seem to find anything about this in the docs.
seaders
  • 3,878
  • 3
  • 40
  • 64
7
votes
1 answer

Facebook API: How to get the FB login user's unique ID? ID from API doesn't match 'real' user ID in v2.0

- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id)user { self.profilePictureView.profileID = user.objectID; self.nameLabel.text = user.name; NSLog(@"My ID:%@", user.objectID); } I have tried to print the…
6
votes
1 answer

How to get facebook likes, shares, and comment count for a post url without using fql?

I need facebook like, share and comment count by passing the post url ("www.example.com/exampleblog") without using fql(as fql is not supported in v2.1). i dont want the below one https://graph.facebook.com/fql?q=SELECT url, share_count,…
5
votes
1 answer

Facebook Graph API stopped recognizing publish_action scope

I'm trying to upgrade an integration with the Facebook Graph API from version 1 to version 2.0, but I'm facing a problem: The permission publish_actions is not being shown in the dialog for granting. I'm doing it manually (without the JS SDK). PHP…
jairhumberto
  • 535
  • 1
  • 11
  • 31
5
votes
1 answer

Not fetching any events using Graph Api

Using This code for getting event:- new Request(session,"/{event-id}",null,HttpMethod.GET,new Request.Callback() { public void onCompleted(Response response) { /* handle the result */ System.out.println("Result: " +…
Shashank singh
  • 641
  • 3
  • 14
5
votes
1 answer

Getting like and comment counts per post of facebook page by graph api version 2

I have been getting like and comment counts per post of facebook page/group feed call by graph api separately using FQL but as version 2 of graph api released fql no longer working to serve purpose. So i have to find new ways to get comment and…
5
votes
2 answers

Query Facebook for what version of the Graph API is being used / can be used

I'm the author of a Wordpress plugin that leverages the Facebook Graph API. Recently, some Graph calls are failing for new plugin users (only new users are affected). After some digging, I believe I've stumbled on the cause here:…
J23
  • 3,061
  • 6
  • 41
  • 52
5
votes
1 answer

Facebook sharing: going from 'feed' to 'share_open_graph'

I'm messing around with an Angular app, let's say for the sake of argument that I'm not using any meta tags, how can I use the Share Dialog to let users share pages of my app? Using the old Feed Dialog works, but it has been deprecated:…
atax1c
  • 69
  • 4
5
votes
1 answer

How to get the Facebook followers or subscribers count for Graph API version 2.0?

I am using Facebook Graph API version 2.0. I want to get the Facebook followers or subscribers count for some users. The complete Facebook page URL like: https://www.facebook.com/XXXUsernamexxx is with me. I got a solution from how to get followers…
5
votes
1 answer

Refreshing facebook long lived access token without user interaction

My each user generating a long lived (60 days) access token from my site using graph api.But the problem is when it expires after 60 days, user have to generate it again by coming to my website.Sometimes they forget about token expiration and…
5
votes
1 answer

how to get a list of all user friends?

I am building an app using Facebook Graph API v.20. The first thing it needs to do is to export the complete list of friends from the user (ID, name and picture) to a CSV file. Is this possible?
5
votes
1 answer

Mapping App-Scoped-Ids for apps pulling page posts

We run a platform that acts as a one-stop warehouse of user's interactions with a brand, both through apps (campaigns etc) and through the pages run by the brand. So far, the linking up of facebook users across apps and page-posts was simple - since…
Shreeni
  • 3,222
  • 7
  • 27
  • 39
5
votes
2 answers

How to get Facebook user's friends' profile picture using Javascript SDK V2.0

I am creating a website using Facebook API V2.0 JavaScript SDK and I would like to display the profile pictures of the user's friends. I have managed to display my profile picture using the graph API but I can't manage to get the ID of all my…
1
2
3
17 18