6
votes

I am not the owner of some page but i want access the pages reviews and ratings,Each access time i am getting empty data set

> http="https://graph.facebook.com/102227700571/tabs/reviews?access_token=fb_oauth"
>  content=callAPIInfo(http,fb_oauth)
> content
$data
list()

I saw some of the similar12 question but didnt get my answer,I dont wanna collect page access tokens from the admin of each pages,Is it possible to fetch review and rating.thanks.

EDIT

Finally i find a very detailed answer by ifaour for access pages token by admin and its necessary to take page access token so here is how to get page access token and review and rating

  1. Go to the Graph API Explorer
  2. Choose your app from the dropdown menu
  3. Click "Get Access Token"
  4. Choose the manage_pages permission (you may need the user_events permission too, not sure)
  5. Now access the me/accounts connection and copy your page's access_token Click on
  6. your page's id Add the page's access_token to the GET fields Call
  7. the connection you want (e.g.: PAGE_ID/events)

    access_token="xxx" #[what u find above]
    > content=callAPIInfo(http,access_token)
    > content
    $data
    $data[[1]]
    $data[[1]]$created_time
    [1] "2014-04-13T11:37:26+0000"
    
    $data[[1]]$reviewer
    $data[[1]]$reviewer$name
    [1] "abc"
    
    $data[[1]]$reviewer$id
    [1] "100000579606903"
    
    $data[[1]]$rating
    [1] 4
    
    $data[[1]]$review_text
    [1] "Enjoy having coffee here...:)"
    
1
Unfortunatelly your suggested solution doesn't seem to work with accessing any public page's reviews, only the pages that you have access to manage.Cristian

1 Answers

2
votes

See, all-most all the graph API calls needs an access token for access else you'll not get the result.

The different APIs require different kinds of access tokens, some required current user's access token, some requires page access token and some require app access token. And there are also some APIs that can use either of these tokens.

You want to get the rating/reviews of a page. If you read the official documentation for the same (/{page-id}/ratings), it clearly says-

A page access token is required to retrieve this data.

So you have to have the page access token to get the ratings/reviews of that page. (and for that you should add manage_pages permission and get the page access token with /{page-id}?fields=access_token)