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

Simple example to post to a Facebook fan page via PHP?

I've done a lot of searching and I've found outdated tutorials that don't work... I have a site made with PHP and when I submit a particular form in my admin area, I want to publish to my Facebook "fan page" There is no RSS available, so do you have…
nmarti
  • 1,565
  • 3
  • 14
  • 19
49
votes
5 answers

Using "share_open_graph" Facebook UI to create dynamic share dialog for quiz results

Summary: My problem is getting FB.ui, via the share_open_graph method, to create a customised share dialog that contains different title, description, and picture, based on the user's actions on the page. The question was my first and I had no…
48
votes
2 answers

Combining the meta description and Open Graph Protocol description into one tag

Is it possible to combine the meta description and Open Graph Protocol description… …into one when they contain…
Boost Ventilator
  • 483
  • 1
  • 4
  • 7
48
votes
10 answers

Is there an API to force Facebook to scrape a page again?

I'm aware you can force update a page's cache by entering the URL on Facebook's debugger tool while been logged in as admin for that app/page: https://developers.facebook.com/tools/debug But what I need is a way to automatically call an API endpoint…
46
votes
6 answers

Why new fb api 2.4 returns null email on MVC 5 with Identity and oauth 2?

Everything used to work perfect until fb upgraded it's api to 2.4 (I had 2.3 in my previous project). Today when I add a new application on fb developers I get it with api 2.4. The problem: Now I get null email from fb (loginInfo.email = null). Of…
Dudi
  • 3,069
  • 1
  • 27
  • 23
45
votes
6 answers

"An access token is required to request this resource" while accessing an album / photo with Facebook php sdk

I am using the php sdk to access a user's albums and photos in a website. I am able to login and also able to retrieve all the info about the albums and photos. However, I am not able to display these photos on the webpage. When I try the graph API,…
Alloi
  • 663
  • 2
  • 7
  • 10
45
votes
7 answers

Facebook Messenger webhook setup, but not triggered

So I'm trying to setup a bot for the new Facebook Messenger API. I'm following the quickstart. I setup the webhook ok, and see it in my webhooks, I called this: https://graph.facebook.com/v2.6/me/subscribed_apps?access_token=%3Ctoken%3E and it did…
James
  • 17,965
  • 11
  • 91
  • 146
45
votes
3 answers

Facebook Image URL gets expired

I am pulling Facebook posts using facebook-graph API, now the problem is Image gets expired after few days. I have the following URL for a single Image Old Image URL which got…
44
votes
5 answers

Paging does not work and maybe I found the cause

I am trying to implement the stream (news feed) paging function to my app, but it does not work as expected. I found many similar questions here but there are no solutions to solve this problem. I tried both Graph API and FQL and the behavior was…
daoki2
  • 441
  • 3
  • 4
44
votes
4 answers

Facebook oauth retrieve user Email

I am using Facebook Javascript SDK to get oauth token and retrieve all the data from FB: function login() { FB.api('/me', function (response) { alert('You have successfully logged in, ' + response.name + ", " +…
Stewie Griffin
  • 9,257
  • 22
  • 70
  • 97
44
votes
8 answers

Get Facebook "Like" count for every page on my domain

I have integrated the Facebook "Like" button into a lot of pages in my site. I want to display the most "Liked" pages on my site in a list, but I can't figure out how to get that data from Facebook in one request. So far, I have been able to get…
KOTJMF
  • 991
  • 1
  • 7
  • 17
44
votes
5 answers

List of Facebook error codes

I'm looking for a list of all Facebook can return when you try to fetch infos using Graph API. Can anyone help? Facebook returns a 400 HTTP error, and a JSON content like: { "error": { "type": "OAuthException", "message": "Invalid…
Alexis Dufrenoy
  • 11,784
  • 12
  • 82
  • 124
44
votes
9 answers

Adding a Tab to facebook page

I just created a facebook page. I also have a separate facebook APP. How can I add a tab containing my facebook APP to the facebook page? I've set the app to allow install on pages, and added a tab name, tab image, etc, but the app doesn't show as…
teepusink
  • 27,444
  • 37
  • 107
  • 147
43
votes
4 answers

how can I find the owner of a facebook app ID?

A while back I created an app ID on facebook and added the appropriate meta data to a website. I now want to continue adding facebook-related features to the site, but it seems the app is not related to my account afterall. I must have created it…
Craig
  • 1,277
  • 2
  • 16
  • 29
43
votes
10 answers

Retrieve Facebook Post Comments Using Graph API

I tried to get Facebook comments using: http://graph.facebook.com/[post_id]/comments It results only 2 of 15 comments, and without count info. { "data": [ { "id": "[post_id]", "from": { "name":…
Jeaf Gilbert
  • 11,495
  • 19
  • 78
  • 105