Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get facebook page rate and reviews using Graph api

I am creating website to search places using graph API. I got the places details from graph API. Is there any way to get the page rating and reviews of the places via graph API?

like image 933
user3082327 Avatar asked Dec 17 '13 13:12

user3082327


People also ask

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 get reviews on Facebook API?

The Facebook API returns 5 reviews per request. The order in which reviews are returned is by date from newest to oldest. You can get all reviews from a single place by using the cursor parameter. Unlike other integrations, the facebook api doesn't support the offset parameter to paginate the results.

How do I get data from Facebook Graph API?

Open the Graph Explorer in a new browser window. This allows you to execute the examples as you read this tutorial. The explorer loads with a default query with the GET method, the lastest version of the Graph API, the /me node and the id and name fields in the Query String Field, and your Facebook App.


2 Answers

I had the same problem and I answered my own question here:

you need to call {page-id}/ratings?field=open_graph_story, but you need the access token of your page for that (use /me/accounts in the Graph API Explorer to get the token). You find further information in the facebook documentation.

like image 165
Sascha Avatar answered Oct 22 '22 11:10

Sascha


This is an old post, but I wanted to give some extra info to others that might be looking for a solution to this problem still. As stated in the Facebook Open Graph documentation, you definitely need a page access token to get the page's individual ratings/reviews. If you are looking for the overall rating and the count of reviews, however, you are in luck. By simply making a call to /{page-id}?fields=overall_star_rating,rating_count, you will be able to access that data.

Here's an example response:

{
    "overall_star_rating": 4.7,
    "rating_count": 31,
    "id": "{page-id}"
}
like image 21
David R. Myers Avatar answered Oct 22 '22 09:10

David R. Myers