user3587846
user3587846

Reputation: 141

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

Upvotes: 14

Views: 43978

Answers (2)

TechnoPHP
TechnoPHP

Reputation: 11

You need to set permission in the app to access the {GET /{page_id}/ratings} API. The permission is common for /page/comments, /page/posts, /page/ratings, /page/tagged, and the permission name is "pages_read_user_content"

https://developers.facebook.com/docs/permissions/reference/pages_read_user_content

Upvotes: 1

Tobi
Tobi

Reputation: 31479

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)

Upvotes: 14

Related Questions