Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get public post from Facebook's Graph Search API

I am new to Facebook APIs. I am using Graph Search API and want to get public post such as comments, status updates who are having conversation about an object (could be a thing, location, personality etc).

I have valid access token with me.

Is it possible? How?

Any solution is welcome.

Thanks in Advance

like image 513
ijs Avatar asked Dec 19 '13 05:12

ijs


People also ask

How do I get Facebook posts on API?

Your app needs user_posts permission from the person who created the post or the person tagged in the post. Then your app can read: Timeline posts from the person who gave you the permission. The posts that other people made on that person Timeline.

What data can you 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 use Facebook Graph API and extract data?

To use the Graph API Explorer tool, go to developers.facebook.com/tools/explorer. Generate the access token you need to extract data from the Facebook Graph API by selecting Get User Access Token from the App Token drop-down menu under the name of your app.

Is Facebooks API public?

With the Facebook API, you can access and read public data for Facebook Pages that you are not the admin of. This data, including business metadata, public comments, and posts, can be used for competitive analysis and benchmarking.


2 Answers

UPDATE:

Public post search is no longer available from API version >=2.0.

Please refer to https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0#search


Original Answer:

Yes, of course it's possible.

You can search over all public objects (posts, users, pages, groups) using:

https://graph.facebook.com/search?access_token=<token>q=QUERY&type=OBJECT_TYPE 

Facebook search API is pretty easy to use. I would suggest you to read the documentation for the Search API. I will also recommend using Graph API Explorer for trying out your queries.

like image 85
Rahil Arora Avatar answered Nov 12 '22 14:11

Rahil Arora


As an update, I would mention that public post search are no longer available from API version >=2.0.

See docs: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0#search

like image 37
Davide Spataro Avatar answered Nov 12 '22 15:11

Davide Spataro