Question

On my facebook page I have reviews, I am wondering if its possible to have this review box on my page, on my website, similar to the activity feed plugin.

I know there is not a plugin for this, but I think it would be good for my customers to make a review of my pub on my website and for it to post to facebook reviews

Was it helpful?

Solution

Bad news, page ratings can't be posted through facebook API, you can only do GET requests. So the only thing you could create on your website is a livefeed of your page ratings, if a user wants to rate your page you will have to redirect him to your facebook page.

I don't know the existence of any plugin that does that for you. But you could create your own, you just need to create a Facebook APP, you could do that easily going to https://developers.facebook.com/ and register yourself as a developer.

Since I don't know what's the language you intend to use, I'm going to post a PHP example, even if that's not the language that you are using, the logic is the same, you just need to use the SDK, in this case I'm using the official PHP SDK, for this script to work you must be admin of the page you want to query the ratings.

Also notice that I'm not posting the entire code here, I'm assuming that you have some experience, if that's not the case, don't panic, it's pretty simple to learn the basics of Facebook APPS.

You will also need to ask for the manage_pages scope, more info on other scopes here:

//get user accounts    
$pages = $this->facebook->api('/me/accounts');//this gets the pages where you are the admin
foreach ($pages['data'] as $page) {
    if($page['id']==PAGE_ID_YOU_WANT){
        //the user is admin of the page you want
        $page_access_token = $page['access_token'];
        $page_ratings = $facebook->api('/PAGE_ID_YOU_WANT/ratings', 'GET', array('access_token' => $page_access_token));
        var_dump($page_ratings);
    }

}

OTHER TIPS

I assume you are referring to page ratings/reviews for Local Business pages. Each rating information are accessible via /{page_id}/ratings as documented here.
You just need to obtain your page's access token and access the endpoint above.

Since you already have reviews on pages, your page is appropriately categorized as one, but for those who have similar problems I post how to modify page settings to have ratings and reviews.

EDIT: Sorry, you were looking for some plugin module just like activity feed. As you can see on the Social Plugins document, they don't provide ratings/reviews plugin. And if you try to implement this yourself, you need to access the endpoint as I introduced.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top