I am wondering if it is possible to have the facebook reviews on my website as a module - facebook

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

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);
}
}

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.

Related

Facebook Like button for one facebook page of an app from it's own ios app

I am looking for Like Button to be shown in my ios native app, users of that app have already connected to app via facebook account.
there are several questions related to Facebook Like Button on stackoverflow but those are not specific to authorized single facebook page of the app.
According to official doc of facebook, facebook pages can not be liked via built-in action o open graph api.
But want only one official facebook page of that app to be liked by user when he hits like button. i don't want user to navigate away from the app or login again in web view to like facebook page.
is it possible to like app's facebook page without promoting user to log in again in webveiw?
Edit
Findings
1. https://stackoverflow.com/a/5837036/1632984
2. Comment by wallacer
"the general consensus does seem to be that you can't like a page on behalf of the user, however I just had an ios game like a page on my behalf. Extreme Road Trip successfully manages to get you to like their own page. I wish I'd paid more attention when I did it now..." – wallacer
This still can't be done directly using the graph api ( to the best of my knowledge ). What you can do is open a webview to the page you want the user to like. If you're rewarding their liking your app or something, when they close the webview (you'll have to provide a close button), you can use the graph api to check whether they like your app page. As far as I can tell this is the best current solution - and seems to be the approach taken by mobile games.
That said, I haven't used Facebook SDK 3 yet, so there may be something in there that could help you.
It appears that Liking a page on behalf of a user is still impossible. I've glanced over the iOS SDK Reference, and it doesn't seem like there is a built in mechanism to like anything.
However, in reading one of the other posts you linked to, and remembering that Facebook opened up the Like open graph action so app developers could allow their users to like content generated by their application...I found this link about built-in-actions (likes).
According to that link, you can post Like actions to your users by POSTing to https://graph.facebook.com/<user_id>/og.likes with the POST params for object (the open graph object URL you want to like on behalf of the user in this case your page's url. eg. www.facebook.com/yourpage) and access_token (obviously, for your user).
I'm not totally convinced that will work; though it is conceivable. My second thought would be to create an Open Graph Object for your page, and have all your users like that. Though, that is a little less ideal, as it removes the possibility of people finding your Page while they're on Facebook and would require you to put a lot more effort into getting likes for the Page via your website, application, etc.
I hope that helps a bit, good luck.

Autopost to existing Facebook page from Wordpress

I have developed a Wordpress site that is hosted on the client's server. The client does not want to enable SSL on the server, but wants to be able to auto post from WP to an existing FB page. Is this possible? I know there are a couple of awesome plugins but they all require a FB App to be created. The client does not want to do this, they want to use their existing FB page. Me thinks I might be in for some extra coding.
There are a number of APIs available to work with pages:
https://developers.facebook.com/docs/reference/api/page/
I'm not sure exactly what you're looking to do from WP, but there might be a way to do that through the Page API. Note that working with pages requires you to have a page access_token, which you will need to set up.
You can set their facebook page up with this plugin: https://www.facebook.com/networkedblogs. It will allow for blog posts to be automatically posted on a facebook page.

Streaming Facebook Pages Wall (not just the pages posts)

I have looked on 100 forums looking for a simple answer for how to stream every post on a Facebook page's wall (not using the like box for just the pages posts, but everyone's posts). I am the admin of the page and I am already using the like box for my posts so I understand that, however the developer pages of Facebook are too confusing for such a simple task. I will be inserting the stream into an HTML page which will be hosted on www.1and1.com so it can handle most, if not all code.
I know it is a lot to ask but is there evem someplace online that will offer plain step-by-step instructions for my specific needs?
If the social plugins they make available aren't sufficient, you could just pull in the feed with the Facebook graph api using the javascript sdk (easiest) or there is probably an SDK for whatever programming language you know. For example, you can see a list of posts on the coca cola page using the Facebook graph explorer:
https://developers.facebook.com/tools/explorer/?method=GET&path=cocacola%2Ffeed
The /page/feed method needs an access token, but you can use the graph explorer to get an offline_access token that you can use to pull the data in. This may eliminate javascript sdk usage though unless you want to first prompt users to authenticate your application. But otherwise you would just parse the json feed that is returned in the url indicated in the graph explorer (and add your access_token to the end of the url).
Here is a good PHP tutorial on how to display a groups feed on a web page. It would be just as easy to display the posts from a page (since you are the admin)
Just replace the group ID with the page ID. Here is a link to the feed for the Facebook Platform feed graph api results. More info on FB Pages here.

Check whether user of non-facebook app likes/shares particular URL on FB

I'd like to know if there is a possibility to check (using Graph API or any other way) whether given user likes / shares a specific link. Probably I'll have this user's facebook ID or facebook login, but my site is non-Facebook application. Actually it's Dot Net Nuke portal (target: .NET with MS SQL Server) with part of it being avaliable as Facebook app, but certainly not greater part of it, so the solution should be out of Facebook Connect, although it's not a showstopper if it's necessary.
We'll be giving points to users who share/like most of links that we serve in our portal and such possibility would be a great help to make a ranking.
Another option we consider is making some kind of "wrapper" or proxy for FB like / share buttons which will at first save some data in our database (probably - this user clicked on like for this link) and then go on with standard FB like / share route. Did anybody of You tried such solution?
If You have any other suggestion on the subject, please, post them, we'll be really thankful.
It is possible to know if a user has LIKED a site or not. You can get all user's likes with Graph API (you need user_likes permission). Take a look at the docs: http://developers.facebook.com/docs/reference/api/user/
I'm not sure if you can know if he has shared your site, but you could try by parsing his wall with the read_stream permission and then look for your site name/URL post by post.
For just general liking of items on your site, you can use a Facebook Social Plugin. However, you won't be able to associate (or really even access) user activity with users on your site without integrating Facebook Connect and creating a Facebook application for your site. At that point you can design with greater control all the possible user activity and interleave with your facebook calls other calls that affect users' accounts on your site.

post content to facebook to users' wall?

i've built a survey and at the end i want the users to share their result on their facebook wall but i'm finding it hard to find any examples or reference.
something like;
<div>
[ image/graphic ]
"I've just completed survey XXX and got 90%"
<a>post on my wall</a>
</div>
any help appreciated - even if its just terminology i can look up!
Start here. Basically, you're creating a website which you want to integrate into Facebook. To do so, your users will need to "login to Facebook" from your site (unless they're already logged in, such as in another browser tab) and allow your site to perform certain actions on Facebook on their behalf.
The Single Sign-On part is where you will initialize your website as a Facebook application (you'll need to create the application on Facebook first) and provide a login button for your users.
Your login button can be set up to ask the user for specific permissions to act on their behalf with Facebook. I think the one you want is publish-stream but I'm only barely familiar with it, play around with the functionality and see what works best for you. Your users will be presented with a pop-up div stating that your website (or application) is requesting these specific permissions and they have the option to allow or deny. An example can be seen here.
Once you have the user's permission, you make use of the cookie (demonstrated using PHP back on the Single Sign-On link) to gain access to information by use of the Graph API, the JavaScript SDK, Social Plugins, etc.
you should use the facebook api.
Get the "publish_stream" right of a user and use the "api" method of the connection object (with parameters like : '/userid/feed', 'post', array of informations about the post).
I can't find the right code and the official document is not always up-to-date.
OR
Just add a facebook "share" button on your page that uses "meta" markups. You should find examples on about 80% of websites.