10

Long time lurker first time poster...

We are working with Facebooks API's to integrate into our web application and we are able to pull a Companies Page Rating via the {open_graph_story} parameter in the {page-id}/ratings section, however we cannot find a way to comment/reply to the rating. The documentation states:

"If a person has rated your page and a story has been generated, you can follow up with the person by posting to the story's comment node." (https://developers.facebook.com/docs/graph-api/reference/v2.0/page/ratings)

however when we pull the variables we retrieve no ID to reference for a comment. This is what we receive back from our authenticated account:

"data": [
{ "created_time": "2014-07-16T05:52:50+0000",
"reviewer": {
"id": "100000237096397",
"name": "Romey Salazar"
},
"rating": 5,
"review_text": "Great job guys!!!!"
} ],

Does anyone know how to retrieve the id for the rating itself so we can append a comment via API? Or some other way to reply/comment to a FB Page Rating?

Thanks!

Jeremy Wight
  • 111
  • 1
  • 6
  • how you gettin the response form graph api iam calling with my id 642005672526491?fields=ratings iam given all the extended permissions to the page. iam getting this page requires access token. iam also tried with my admin page also till the same result like below. is facebook deprecated this method. { "error": { "message": "(#210) This call requires a Page access token.", "type": "OAuthException", "code": 210 } } – madhu kotagiri Jan 22 '15 at 06:53

3 Answers3

7

When you have some ratings/review comments on your page and if you want to post comment to individual review comments as the Page Owner, you can follow the steps below.

1) Below request returns the json object of rating and reviews.

https://graph.facebook.com/v2.9/{YOUR_PAGE_ID}/ratings?field=open_graph_story&access_token={YOUR_PAGE_ACCESS_TOKEN}

The response json will contain ID field for each and every rating/review comments.

2) Using the ID, trigger the below request to post a comment on the rating as the Page Owner. You will need Page access token with manage_pages and publish_pages privilege.

https://graph.facebook.com/v2.9/{ID_OF_THE_RATING}/comments?message=Thanks for your rating&access_token={YOUR_PAGE_ACCESS_TOKEN}

These requests can be tested using Facebook Graph API Explorer

Baum mit Augen
  • 46,177
  • 22
  • 136
  • 173
Elayamathy
  • 169
  • 2
  • 5
3

You need to request the open_graph_story field with the ratings endpoint. This will return the open_graph_story data which includes an id. You can then post to the comments endpoint of this story.

Thomas Hopkins
  • 621
  • 1
  • 9
  • 19
2

You have to make http get request on

  1. https://graph.facebook.com/v2.9/{PageID}/ratings?fields=open_graph_story&access_token={PageAccessToken}

to get detailed response. Make sure the parameter is "fields" not "field"

Danyal Malik
  • 178
  • 11