Questions tagged [facebook-graph-api]

Facebook Graph API is a structured API for fetching objects and the connections between them from Facebook's social graph

The Facebook Graph API is provided by the Facebook platform to interact with Facebook's social graph. It's a low-level HTTP-based API that you can use to query data, post new stories, manage ads, upload photos and a variety of other tasks that an app might need to do.

This includes Facebook users, pages, and other objects, as well as the connections between them such as links, photos, or notes.

It provides a structured view of the Facebook "social graph" and represents objects in the graph (e.g. people, photos, events, pages) and the connections between those objects (e.g. likes, uploaded, is tagged in).

Tool Graph API explorer - The easiest way to understand the Graph API is to use it with the Graph API Explorer, a low-level tool you can use to query, add and remove data. It's a very handy resource to have at your fingertips while you integrate with Facebook.

You can ask questions with tag which requires Facebook Graph API calls for above objects only with different SDK's.

Resources

34984 questions
74
votes
4 answers

What are all the custom URL schemes supported by the Facebook iPhone app?

Note These URL's are likely not available. Facebook has been updated a number of times and did not officially support any of these. /Note I am trying to see what information is available about the Facebook app on the iPhone. So far I have found…
74
votes
2 answers

How should we retrieve an individual post now that /[post-id] is deprecated in v2.4?

I just tried through the Graph API Explorer with this path /v2.4/10153513872748291 and I've got this result: { "error": { "message": "(#12) singular links API is deprecated for versions v2.4 and higher", "type": "OAuthException", …
Tanin
  • 1,853
  • 1
  • 15
  • 20
74
votes
2 answers

Is it possible to check if an email is confirmed on Facebook?

Update This was reported to Facebook via https://www.facebook.com/whitehat/report/ on Dec 16th 2013 and Facebook responded on Dec 17th that the bug has long since been fixed. I have retested this with my Facebook account (that I still haven't…
72
votes
8 answers

Facebook API: Get fans of / people who like a page

I'd like to get a list of users who like a certain page or a fan of it. The FB API documentation states that you can only get the count of the fans of a certain page using the social graph, but not a list of the fans. A discussion here Retrieve…
72
votes
6 answers

'Like' a page using Facebook Graph API

Using the Graph API I'd like to be able to have an authorized user "like" a page. I tried posting the following https://graph.facebook.com/${PAGE_ID}/likes?access_token=${ACCESS_TOKEN} And I get an HTTP error 500 accompanied by "Invalid post_id…
Tom Wells
  • 1,159
  • 2
  • 9
  • 15
70
votes
8 answers

Facebook Page Access Tokens - Do these expire?

I'm building an app that allows users to administrate their Facebook Fan Pages. This requires the following two Access Tokens: A User Access Token A Page Access Token I'm quite familiar with User Access Tokens, but not with Page Access…
dbau
  • 16,009
  • 2
  • 21
  • 31
70
votes
9 answers

How can I display the users profile pic using the facebook graph api?

I would like to display the users profile picture inside of my applications canvas page, is there a way to do that using the graph api? I know I can do it using FBML but I would also like to pass the profile pic to a flash game I am making, so I…
Odyss3us
  • 6,457
  • 18
  • 74
  • 112
68
votes
9 answers

New og:image size for Facebook share?

Facebook recently changed image sizes for ads, and link posts. This affects also to meta property="og:image". What is new optimal size for og:image at Facebook? The old version was square, now it doesn't fit anymore, because new size is rectangle.
67
votes
6 answers

How to check if user is logged in with FB SDK 4.0 for Android?

A few days ago I implemented FB Login to my APP, and today I found out that most of the things I have implemented are now deprecated. Before, I was using Session to see if the user was logged in or not. However, that doesn't work with the new…
Felipe
  • 5,126
  • 5
  • 18
  • 21
66
votes
25 answers

Facebook SDK returned an error: Cross-site request forgery validation failed. The "state" param from the URL and session do not match

i'm trying to get Facebook user id using the php sdk like this $fb = new Facebook\Facebook([ 'app_id' => '11111111111', 'app_secret' => '1111222211111112222', 'default_graph_version' => 'v2.4', ]); $helper =…
Fadi
  • 2,320
  • 8
  • 38
  • 77
65
votes
5 answers

Get public page statuses using Facebook Graph API without Access Token

I'm trying to use the Facebook Graph API to get the latest status from a public page, let's say http://www.facebook.com/microsoft According to http://developers.facebook.com/tools/explorer/?method=GET&path=microsoft%2Fstatuses - I need an access…
christofr
  • 2,680
  • 1
  • 18
  • 19
63
votes
9 answers

facebook login issue - canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"

When I click on login with Facebook button, it is opening safari browser and getting closed immediately. Noticed error on the console. App delegate method: func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) ->…
sfbayman
  • 1,067
  • 2
  • 9
  • 22
62
votes
1 answer

Get facebook friends with Graph API v.2.0

A while ago, I used to take the friends of mine using Graph API in this way (using Graph API Explorer): /me/friends Everything was perfect but now, with 2.0 version, I saw that this way does not function for friends who didn't use (via Facebook…
62
votes
1 answer

Facebook 3.0 Android second login attempt returns "Session state closed"

I'm trying to integrate Facebook into my Android app. Using the Facebook Login Button, I tried to login in. When I first install the app, it works fine and login successfully. When I logged out using that button, and then try to login again, it…
60
votes
7 answers

How to extend access token validity since offline_access deprecation

Since the offline_access Permission is deprecated in Facebook's Authentication flow, we have problem getting the so called long lived access tokens without that permission. In Facebook's document about the deprecation it says, that server side OAuth…