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
37
votes
4 answers

What's the max. length of a Facebook uid?

I've seen multiple sizes and I don't want to waste server memory on a MySQL field which is reserving too much space for too many characters. What's the biggest they can get and will this ever change?
Farid El Nasire
  • 1,753
  • 4
  • 15
  • 17
37
votes
7 answers

Saving facebook id as int or varchar?

My question is more advisory than technical. I'm writing a Facebook app in which I am fetching some information about the user, including facebook_id. I was wondering if I should keep the user id as INT or VARCHAR in the MySQL database?
Sharon Haim Pour
  • 6,595
  • 12
  • 42
  • 64
37
votes
3 answers

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…
humanzz
  • 897
  • 2
  • 10
  • 18
36
votes
6 answers

Can you get a public Facebook page's feed using Graph API without asking a user to allow?

I've never used Facebook's Graph API, or OAuth. I'm simply trying to get a public Facebook page's feed using the Graph API, but it requires an access token. I don't want to hassle the users to login and allow access to get their token. A Facebook…
36
votes
3 answers

Loading external javascript in google chrome extension

I'm writing a Google Chrome extension which manipulates the current page (basically adds a button). In my content script, I want to load the Facebook Graph API: $fbDiv = $(document.createElement('div')).attr('id', 'fb-root'); $fbScript =…
36
votes
4 answers

How do you pass an apostrophe through a URL?

I'm using Node.js: var s = 'Who\'s that girl?'; var url = 'http://graph.facebook.com/?text=' + encodeURIComponent(s); request(url, POST, ...) This does not work! And Facebook cuts off my text... Full code: function postToFacebook(fbid,…
user847495
  • 9,831
  • 17
  • 45
  • 48
36
votes
1 answer

How do I use the fbtrace_id to find more information?

The Facebook Graph API often throws errors and mentions you can use the fbtrace_id to find out more information about the error. Every time I try to use the fbtrace_id, I get another error with a new fbtrace_id. It goes in a circle. Then I click…
Eric
  • 3,773
  • 3
  • 29
  • 29
36
votes
3 answers

Error Invalid Scopes: offline_access, publish_stream, when I try to connect with Facebook API

I got this error when I try to connect with Facebook API Invalid Scopes: offline_access, publish_stream. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid…
36
votes
6 answers

Facebook App : This must be derived from Canvas URL, Secure Canvas URL

Hi I wan't to create a facebook app to use it for the auth in my new site locally installed(my machine),but from yesterday I don't succeed to install it and use it, all time I have this very strange error when I wan't write a domain in the "App…
user3001795
  • 515
  • 1
  • 5
  • 8
36
votes
7 answers

Allowing multiple domains for 1 Facebook App (like Tumblr)

I am trying to get my website validated with the Facebook object debugger and I'm running into the following error: Object at URL 'http://www.example.com/latest' of type 'smallteaser:teaser' is invalid because the domain 'www.example.com' is…
stikkos
  • 1,916
  • 2
  • 19
  • 34
35
votes
1 answer

Looking for the Type details for page_stories_by_story_type & page_consumptions_by_consumption_type

We are pulling page stats for page_stories_by_story_type & page_consumptions_by_consumption_type. I am looking for some confirmation and insight for the below Types. We believe we have been able to determine a few of these but some we are not sure…
35
votes
5 answers

How to fix 'Facebook has detected MyApp isn't using a secure connection to transfer information.' error in Laravel

I am trying to connect my app to facebook login with Laravel and socialite package.But i don't know why facebook show me this error. I searched internet but i couldn't find anything .How can i fix this error ? I thought that if i make my connection…
Ani
  • 551
  • 1
  • 5
  • 18
35
votes
4 answers

Facebook Messenger Bot verification

I submitted my facebook messenger bot for app review and the rejection reason was "received no response". I've tested my bot from my own account and some other testers that I added to my facebook app for testing. However, when I try to test using…
35
votes
1 answer

ArraySlice in Array Swift

after using the prefix method on an Array I get what is called an arraySlice. How can I transform this into an Array? I am trying to fetch Ints from FacebookGraphApi then asking for the first 3 (prefix(3)) and trying to add them into a new…
JVS
  • 2,592
  • 3
  • 19
  • 31
35
votes
3 answers

How to get user's username in v2.0 or later of Facebook's Graph API

I used to get the user's username in the API 1.0 fairly easily, using /me and getting the username property of the response object. Now I'm getting this error with API 2.0: "(#12) username is deprecated for versions v2.0 and higher" The only way I…
joaopribs
  • 648
  • 1
  • 7
  • 13