Why the number of comment in Facebook plugin is different from number of comment in Facebook API? - facebook

The question is as what the title stated. For example:
Social Plugin
There are only 2 comments in the Facebook plugin for that link.
Facebook API
The Facebook API says that there are 47 comments. What is the cause of the different? My thought is that the social plugin only counts the number of comment via the plugin, while the Facebook API one counts all the comments including the social plugin and any comment on the link in the Facebook. Am I wrong?

Check out data from Graph API.
It returns precise data, comment count for a Url, which is commented by a social plugin.
You, on the other hand, are accessing data from table link_stat, which is used for, as per offcial documentation
An FQL table containing counts that show how users on Facebook are interacting with a given link.
In the end, I agree with you, you get all activity for that link on the whole FB.

Related

Retriving the data of the Google+ Comment Widget?

I have 2 articles I'm going to merge into a new one. Each one has the Facebook and G+ comment widgets.
With the Graph API, I can get the FB comments of both articles, inserting to DB and assigning them to the new article.
But I can't find a way of merging the Google comments.
Is there an API that allow me to do the same as FB?
Thank you
PS: Also, is there a way of merging FB likes and Google +1?
The answer is mostly no. You can get comments with activities.search but it will only return comments that have been publicly shared to Google+. Comments not shared to Google+ or shared to a circle on Google+ are not available through the search API.
Merging Facebook likes and Google +1's is as simple as taking the two numbers and adding them together. The difficult part is getting the numbers. Facebook has an API that returns the number of likes but Google+ does not. There is an open feature request you can star.

How do I publish a blog post to facebook so that the likes and comments are merged?

I have a wordpress blog. Is it possible to publish a link to facebook so that the published link on my facebook business page has the same like counter as the one on the blog?
Also, can the comments section be the same? (i.e. if I post the link on facebook, when someone comments, it automatically updates the comments section of the blog post and vice versa?)
This is not possible, each set of likes and comments are independent. There is no way to perform a merge of this data currently.
The Facebook Wordpress plugin provides essentially most of what you can do currently to link Wordpress to the Facebook API http://wordpress.org/extend/plugins/facebook
You can't link the like counter of your posts and pages to your Facebook page, why? They're all separate post and pages. It only makes sense.
What you can do? You can announce your post on Facebook (timeline or business page) and all can comment on it. You can add Facebook comments to your posts and pages. The commenter has the choice of that comment showing up in his Facebook timeline. People can "like" the post announcement, or the post itself if you have the Like button on it. They both act separately because for people to actually like your post, they have to visit the page. For analytics it makes sense because you want to know who is in your Facebook page and who actually clicks to visit your site. Both are not the same, and that's the point.
If you want to actually merge your site with Facebook, it will have to be in the form of a Facebook app. If that's the direction you want to take, I believe you can find some help here on the matter.

Link or connect facebook comments plugin to comments on fan page wall posts

Facebook comments plugin - as far as I understand, if I have put the facebook comments plugin on a post web page, and the permalink of the post being commented on matches the base URL, then comments are stored via facebook using my post permalink.
Lets say if I post the permalink onto my facebook page wall (which I am the admin of), the open graph tags come into play, all the relavant data is pulled in, fb:admins, fb:app etc.
But is it possible to connect my facebook page (using my facebook page ID) to that permalink - so that comments posted on the page using comment plugin, connect/link with the post comments on my facebook page wall?
Thanks
This is currently not possible. We've implemented custom solution using Facebook Application and Facebook Javascript SDK on the website itself. You need to query the comments table of a specific Page post via FQL using your app access token from your server to retrieve all comments and render them on the page.
Then you need to provide user with several entry points for several states in order to enable posting for them. You need to solve four cases:
User doesn't like the page and didn't authorize your app
User doesn't like the page and authorized your app
User likes the page and didn't authorize your app
User likes the page and authorized your app
User needs to like your page and authorize your app with publish_stream permission in order to be able to comment on your page posts via your website. Of course you need to maintain reference between posts on your page and posts on your website.
The website where we did this a few years ago is BIGGBOSS click on "Komentáře" and find the same post on Facebook with the same comments.
As far as I understand your question its not possible to connect the comments from the commentbox, integrated in your non-facebook page (e.g a blog of yours), to the comments which are posted to a post on your fanpage.
The only solution would be to build an custom commentbox with the open-graph and publish the comments to the fanpagepost and additionally extract the comments out of the fanpage to display them on your blog.
But this requires accepting permission dialog before people are able to comment on your blog which would probably decrease the comments made. You would lose the benefit of the built-in commentbox.

Programmatically posting Facebook comments

My application has obtained publish_stream permissions for a Facebook user.
I'd like to allow the user to post comments for a target URL directly from my mobile application, rather than opening up an embedded browser that then shows the Comment Box plugin. That is, the user doesn't necessarily want to post the link to their feed -- rather they want to participate in any Facebook comment discussion that surrounds that URL.
Naturally, I can read the comments for any URL via the Graph API (eg: a techcrunch article) but I do not know how, or if I can add comments to an arbitrary URL programmatically.
Would love to hear any other suggestions or workarounds as well. My hope is to piggy back on Facebook comments to allow my users to have a conversation surrounding URLs of interest to them. If at all possible, I'd also prefer to use Facebook, though I can see using Disqus or similar services would be another possibility.
Use graph api, demo comments here
make POST to
http://graph.facebook.com/comments/?ids=http://techcrunch.com/2011/07/22/big-surprise-the-ipad-trumps-android-tablets-at-the-office/
with field message and value "yourmessage"
I genuine Facebook API bug.
Cannot comment via Graph API on Comments Plugin (Probably try Legacy API)
Graph API

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.