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
60
votes
5 answers

Facebook Graph API GET request - Should contain "fields" parameter (Swift, Facebook SDK v4.5.1)

My iOS app uses Facebook's Graph API Request during sign up to get user information, which worked fine prior to upgrading to Facebook's newest SDK. After upgrading, I'm getting a runtime error stating: "FBSDKLog: starting with Graph API v2.4, GET…
Armin
  • 1,271
  • 3
  • 17
  • 31
59
votes
3 answers

Facebook debugger: why complaining about app_id missing

While using the facebook debugger, it complains: Warning fb:app_id hasn't been included in the meta tags. Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app_id can be set in url when…
Augustin Riedinger
  • 20,909
  • 29
  • 133
  • 206
59
votes
8 answers

Get username field in Facebook Graph API 2.0

The "old" Facebook Graph API had a "username" field which could be used to create a human-readable profile URL. My username for example is "sebastian.trug" which results in a Facebook profile URL http://www.facebook.com/sebastian.trug. With Graph…
trueg
  • 601
  • 1
  • 5
  • 4
58
votes
13 answers

Getting the Facebook like/share count for a given URL

I'm using the Facebook API to get the like/share count for given URLs. The strange thing is that it seems to be quite inconsistent in returning results. For example, this page returns…
Vijay Boyapati
  • 7,632
  • 7
  • 31
  • 48
58
votes
14 answers

Facebook Email field return null (even if the “email” permission is set and accepted)

For some users in our application, the email field returns NULL even if the user has granted the email access to the app. When we check the scope parameter and the validity of the user Token thanks to the Debugger tool, everything is ok. The…
Benjamin Naïm
  • 583
  • 1
  • 4
  • 4
57
votes
4 answers

Get long live access token from Facebook

As I understand it, recently Facebook has decided to remove the offline_access permission and has introduced a concept called long-lived access tokens which last a maximum of 60 days. Is there anyone who knows how to get this access token with the…
Ananda Subasinghe
  • 1,265
  • 2
  • 13
  • 24
56
votes
5 answers

What is the correct way to refresh Facebook OAuth2 access token after it expires?

As I understand it, this is the basic process for new Facebook iframe canvas apps using the OAuth2 API in a nutshell: Redirect to (or have user click link to) app's authorization URL User authorizes and is redirected to your callback URL Callback…
mtjhax
  • 1,988
  • 1
  • 18
  • 23
55
votes
15 answers

What is the minimum width and height Of Facebook Open Graph Images?

I had read that images associated with a given URL in the Facebook open graph had to be greater than 50 x 50 However, when we ran the Facebook Object debugger - we got the following warning: "Tiny og:image: All the images referenced by og:image must…
Evan B
  • 591
  • 1
  • 4
  • 6
53
votes
7 answers

Getting full-size profile picture

Is there anyway to get the full-size profile picture using any facebook api? http://graph.facebook.com/{ID}/picture?type=large is way to small. Thanks :)
Richard
  • 14,427
  • 9
  • 57
  • 85
53
votes
5 answers

Facebook adding tester users and admin is: (pending), what does that mean?

The new Facebook developer integration should be really handy and easy, but i'm struggling with creating a test user or a regular Facebook user to get permissions to sign in my app. I opened a "TestApp", and login in as a "Admin" works great! The…
MCMatan
  • 8,623
  • 6
  • 46
  • 85
52
votes
15 answers

why do I get "Invalid appsecret_proof provided in the API argument"

Since the latest change on Facebook, regarding the appsecret_proof: https://developers.facebook.com/docs/reference/api/securing-graph-api/, we are still unable to download performance reports even after enabling/disabling features from Advanced…
user1508682
  • 1,329
  • 5
  • 23
  • 34
51
votes
6 answers

Using facebook SDK on Android gives "User logged in as different Facebook user." error

I'm upgrading my use of the Facebook SDK to the latest version. The following code is prety much lifted line by line from Facebook's own examples, which can be found here: https://developers.facebook.com/docs/facebook-login/android/v2.3 import…
spacitron
  • 2,095
  • 7
  • 30
  • 39
50
votes
34 answers

Redirecting to authentication dialog - "An error occurred. Please try again later"

Why does it always happen to me? This happens after my application verify for user user login and redirect user to the authentication page: …
Wanderson Silva
  • 1,179
  • 1
  • 17
  • 35
50
votes
1 answer

How to discover which friends accepted invites with Facebook API?

Facebook API v2.0 introduced the invitable_friends edge. An example response from a GET request to this edge is: { "data": [ { "id": "AVkgK9fLFxasdvXNbDV_gYogR6lXa9SKLnH...", "name": "Anita Sujarit", "picture": { …
James Webster
  • 31,873
  • 11
  • 70
  • 114
50
votes
5 answers

Get Facebook User ID from app-scoped User ID

With the upgrade from Facebook Graph API v1.0 to v2.0, Facebook is using "App-scoped User IDs", so I cannot see the "original" user ID inside my apps anymore. I always used the Real Time Updates and graph API calls like…
kolli
  • 1,260
  • 2
  • 13
  • 23