Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get friendship details in Facebook Graph API?

How can I get a friendship detail for two people? So for example in the web it will be:

http://www.facebook.com/<my_id>?and=<friend_id>

Is there any way I can do this in Graph API? Furthermore can I get specific items such as photos together, wall posts between us, etc? (Not documented AFAIK, but many Graph API features aren't anyway...)

EDIT: I think it should be possible with Graph API. For example getting family details (brother, sister, parents, etc) is not documented yet I still able to do it.

like image 939
Enrico Susatyo Avatar asked Feb 02 '11 11:02

Enrico Susatyo


People also ask

What data can I get from Facebook Graph API?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

How do I get Facebook Page Insights on graph API?

You can access Page Insights by typing /insights after the name of your page in the URL field. This command will retrieve all of the Insights associated with your Page. Type "/insights" after your company name. Click the Submit button.

How do I pull data from Facebook API?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

Is Facebook Graph API deprecated?

API Version Deprecations: As part of Facebook's Graph API and Marketing API, please note the upcoming deprecations: August 3, 2021: Graph API v3. 3 will be deprecated and removed from the platform. August 25, 2021 Marketing API v9.


1 Answers

You can simulate a friendship query by doing multiple FQL queries. For example, to get all the photos between two friends A and B, you can:

  1. Get all photos (p) from A
  2. Get all tags of B in p (query on the photo_tags table)
  3. Get all comments made by B on p (query on the comments table)

Repeat, this time selecting photos from B.

You can apply the same concept on other things such as posts, likes, videos etc.

like image 196
phillee Avatar answered Oct 31 '22 01:10

phillee