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
42
votes
13 answers

Facebook Graph API - upload photo using JavaScript

Is it possible to upload a file using the Facebook Graph API using javascript, I feel like I'm close. I'm using the following JavaScript var params = {}; params['message'] = 'PicRolled'; params['source'] = '@'+path; params['access_token'] =…
Moz
  • 1,494
  • 6
  • 21
  • 32
42
votes
12 answers

Why does Facebook Graph API say my account is non-active?

We have some code that uses Facebook Open Graph API to display some posts on our home page. It was originally developed by a previous developer and I rewrote it in ASP.NET MVC for our home page (where before it was PHP which I believe was loaded in…
mrcoulson
  • 1,331
  • 6
  • 20
  • 35
42
votes
3 answers

Facebook api: (#4) Application request limit reached

Since late November we are hitting the application limit on the Facebook API. We are fetching user's photos, and selected 25 friends photos → this is done when a user signatures in (we are building albums for the users). The above action is limited,…
Ronny Elkayam
  • 421
  • 1
  • 4
  • 4
41
votes
4 answers

Xcode keeps showing:-1: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2.Any solution?

When I install facebook SDK pods into my ios project, It says ":-1: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'FacebookCore')" I am using swift 4.2 any solution?
Jaseel.Dev
  • 730
  • 1
  • 7
  • 19
41
votes
7 answers

Posting an embedded video link using the Facebook Graph API

When manually attaching a video link (from YouTube, Vimeo, etc) to a post using the Facebook web interface, Facebook automatically recognizes the link as a video, and allows the resulting status message to play the video inline. The video is…
Ryan McGeary
  • 235,892
  • 13
  • 95
  • 104
41
votes
9 answers

how send message facebook friend through graph api using Accessstoken

Can anyone help me to send message to facebook friends using graph api. I tried $response = $facebook->call_api("/me/feed", "post", "to=john","message=You have a Test message"); It's not working. I have the accesstoken of the user in my hand.only I…
40
votes
1 answer

How to remove auxiliary products from FB app?

I wanted to check what that button +Add Product do, added two products and now I want to delete them. But it seems FB doesn't provide any any UI to delete products from apps. Does anybody know how to get rid of them?
Green
  • 28,742
  • 61
  • 158
  • 247
40
votes
1 answer

Facebook graph API returns only name and id for some websites

I've developed a WordPress plugin for social login using Facebook. I'm using the Facebook graph API /me to retrieve the user details. My problem is that for some websites, when installed a Facebook login plugin, I'm only getting user ID and name.…
Jay Maharjan
  • 566
  • 1
  • 4
  • 14
40
votes
3 answers

Using Facebook Graph to simply post a wall message with just javascript

In Facebook how can I post a message onto a user's wall saying "I scored 8/10 on objects game" then a URL? I really don't want to have to use the full API, as I don't want to handle user login details. I don't mind if Facebook needs to authenticate…
Glycerine
  • 7,157
  • 4
  • 39
  • 65
40
votes
7 answers

How to get Likes Count when searching Facebook Graph API with search=xxx

I am currently using Facebook graph api search to search posts as http://graph.facebook.com/search?q=iwatch&type=post&access_token=xxxxx It returns in JSON format fields and use to include the like:count for a given post. After reading the dev…
Digby Norris
  • 401
  • 1
  • 4
  • 5
39
votes
6 answers

How to get large photo URL in one API call?

I want to display large photos in my Facebook app's feed view immediately. Is it possible to get the large photo src URL from a stream/feed using one API call? The photo id is returned in the stream/feed and one can of course then supply this…
John Wright
  • 2,418
  • 4
  • 29
  • 34
39
votes
26 answers

Why is Facebook PHP SDK getUser always returning 0?

I'm trying to work with a website that requires some information from a Facebook user, I'm using PHP and JS SDKs. I have a function in PHP: public function isLoggedOnFacebook() { $user = $this->_facebook->getUser(); if ($user) { …
fd8s0
  • 1,897
  • 1
  • 15
  • 29
39
votes
9 answers

Facebook Graph API - Get ID from Facebook Page URL

I have seen this question but what I want is different. I want to get the Facebook ID not from a general URL (and therefore conditional if it has Like button or not). I want to get the Facebook ID given a Facebook page using the Graph API. Notice…
Hommer Smith
  • 26,772
  • 56
  • 167
  • 296
38
votes
7 answers

Facebook access token invalid with message "session does not match current stored session"?

I have recently started getting this error while posting to facebook newsfeed stream of an app user, I do have an offline access permission for the access tokens, and they worked fine previously. This error is coming for 30-40% of the users. "Error…
DhruvPathak
  • 42,059
  • 16
  • 116
  • 175
38
votes
2 answers

Facebook Page/Post insights with costs

Edit: I've managed to get this far in the documentation: https://developers.facebook.com/docs/graph-api/reference/v2.5/promotion-info However there's nothing linking to the {promotion-info-id} parameter in the docs that I could find. I'll accept an…
Ignas
  • 1,965
  • 2
  • 17
  • 44