Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API For Pulling Reviews

Has anyone seen a full example of how to pull facebook reviews using the graph api.

According to the docs: A page access token is required to retrieve this data.

I have code that asks a user to login already and gets an auth token which I can use to post a message to their facebook feed. Is there an additional step I need to do to be able to read their reviews/ratings?

Here is an example of the code to post to their feed/page.

response = Curl.post("https://graph.facebook.com/#{page_id}/feed", {
    :message => message,
    :access_token => auth_token
  })

Thanks

like image 817
user3587846 Avatar asked Apr 30 '14 05:04

user3587846


People also ask

How do I pull reviews off my Facebook page?

On Facebook, page owners cannot remove individual reviews themselves. However, users can flag a review to notify Facebook's team to remove the reviews. But, users can only flag a review if it has at least one comment on it.

Is the Facebook API free?

In the newest version of the Graph API (v2. 9), we're announcing features that simplify development, making it even easier to build apps and experiences with Facebook. We're providing free access to over 140 million places around the world, the same data that powers Facebook, Instagram, and Messenger.

How can I get Facebook page reviews in PHP?

$request = $fb->request('GET', '/'. $page_id. '/'); // Send the request to Graph try { $response = $fb->getClient()->sendRequest($request); } catch(Facebook\Exceptions\FacebookResponseException $e) { // When Graph returns an error echo 'Graph returned an error: ' .


1 Answers

If you're referring to Page Ratings (different from App Reviews!), then the endpoint is

GET /{page_id}/ratings

as described here: https://developers.facebook.com/docs/graph-api/reference/page/ratings You'll need a Page Access Token for this.

Where I get a little bit confused is that you mention that you want to

read their reviews/ratings

In that case it's something else, because afaik it's currently not possible to query the User's Page ratings via Graph API or FQL. It's was only possible to query App Reviews via FQL (see https://developers.facebook.com/docs/reference/fql/review/) (Update: FQL is no longer available since 2016)

like image 63
Tobi Avatar answered Sep 23 '22 17:09

Tobi