Facebook Comments / Same Comments Every Post - facebook

I've got Facebook Comments enabled on my site, but it puts the same comments on every post.
I think I know where the issue is. I just don't know how to resolve it.
Basically, I've got FB Comments set up to populate the href field with the current page's permalink. (I can't paste it here, as php isn't allowed. But, you can see it in my page source, next to "fb:comment."
In theory, it should populate the permalink section above with the page of the site the comment's being left on.
But, if you look at this post...
http://www.runhundred.com/workout-music/snoop-dogg-wiz-khalifa-bruno-mars-young-wild-free-96-bpm/
...then look at the page source in a browser, you'll see that the permalink that shows up next to fb:comments is this one:
http://www.runhundred.com/workout-music/dj-merritt-blake-potter-stick-of-sin-132-bpm/
So, I guess my question is this: Why is the site pulling up the latter permalink, not the one of the post being viewed?
Any ideas would be appreciated.
Thanks.

Related

Facebook like button says 990k likes on all posts

I've deleted and reinserted the facebook script and it doesn't change anything. It's the same on every blog post. You can see it here: http://rowboatmedia.com/3818/rowboat-media-brand-new-look/
"https://developers.facebook.com/docs/plugins/" - This is the URL you put in the data-href parameter, and it is always the same. You need to use your permalink for the specific page in there - meaning, the URL you want to Like.
And don´t forget to add Open Graph Tags, you don´t have any. > http://ogp.me/

How to know the commented page url for facebook comments moderation?

We have integrated facebook comments plugin for our website with about 8 lakh dynamically created pages(all similar purpose). The href for the comments plugin is dynamically generated, same as the page url.
Further we have created an app for the same and obtained an appId for moderation of comments by adding the required meta tag.
On the dashboard of the account we see the user comments as they are posted with the public comments and moderator views, but we are unable to obtain the actual url of the page on which the comment has been made.
This may be required sometimes to reply to some question that a user has asked on the page.
The reply can be made from the dashboard but certain information in the user query is hidden in the context of the page, so unless we know the actual page url, we are unable to solve the query.
Please let me know how can I know the url of the page on which the comment was made.
First you'll need to go to the comments moderation tool (https://developers.facebook.com/tools/comments?id=YourAppId).
There you'll see by default the 'Public Comments' view. From the same row where the Settings link is change the view to 'Moderator view'.
There are all the comments listed (just like in the public comments if there's any) but under the comment there is a 'Visit Website' link and that link throws you straight to the correct page.

code for showing comments from multiple comment boxes to a single iframe facebook page?

Ive installed a facebook comment box on a php product page on our website. This means the comment box is displayed on all our product pages
Im using
data-href="<?php echo HTTP_SERVER . $_SERVER['REQUEST_URI']; ?>"
as the url to comment on so the urls posted to facebook are the ones the user has commented on.
I'm now trying to display all the comments from the php product page on our website to an iframe tab in facebook.
I've tried adding various different codes to the iframe:
<fb:activity
site="fmysite"
app_id="myappid">
</fb:activity>
and
https://www.facebook.com/plugins/comments.php?api_key=mykey
and various other urls but I cant get all the comments to show in the iframe.
If I put a single url from one of the product pages with comments on it, it works fine. But thats not what im trying to achieve.
Is there any way to do this pls?
In the comment moderation tool, all the comments from all the product pages are shown, what is the code that is showing all the comments there? Can I use that?
Thanks for any help!
As far as I'm aware you can't do that.
You can probably put more than one comment plugin in that page, one per product or something like that, but it's probably not what you're looking for.
Another approach would be to create it yourself.
Using FQL you can fetch the comments for all products (using the urls) and then you can simply display them.
The problem is that you'll have to sort them and render the display yourself.
To get the comments with FQL you'll need to use the comment table and the link_stat table, and do something like this per product url:
SELECT username, text
FROM comment
WHERE object_id IN
(SELECT comments_fbid
FROM link_stat
WHERE url ="PRODUCT_URL")
You can of course select more/different fields, read about your options in the comment table documentation.
You can do that either in the client side using the FB.api method (of the js sdk) or from the server side by issuing http requests to:
https://graph.facebook.com/fql?q=FQL_QUERY
Just keep in mind that you need an active access_token and maybe one or more permissions (check the docs).

How do I make Facebook comments public for all on my website?

I've added facebook comments to my website using the following steps:
I created a new app herehttps://developers.facebook.com/apps/
In the auth dialog page for the app, I set 'default activity privacy' to 'Public'
I got the code for the comments box here https://developers.facebook.com/docs/reference/plugins/comments/
I used the HTML5 version of the code and added it to my site in the two places specified - right after the body tag and where I want the comments to appear.
I then opened the comments moderation tool for my new app.
https://developers.facebook.com/tools/comments?view=recent_comments
I clicked on 'Settings' and turned on 'Make every post public by default'
I also listed myself as a moderator.
I also added
<meta property="fb:app_id" content="{YOUR_APPLICATION_ID}">
inside the head tags for the page.
When I go to my site - the comments box appears to work ok. I can make a comment, but I can only see comments made by me. I cannot see comments made by people I am not friends with. How do I fix this problem? I'd appreciate any help.
Thanks
Every comment you leave on a facebook-comments driven web site is public, the same way it is on a fan page. Even a non facebook member can leave a comment.
I am looking for a way to turn it off and get the same permissions you have on your facebook wall. Currently, everybody who has the link can see the page content and all previous comments.
Had the same issue and figured out that Facebook grabs urls differently for displaying and submiting comments.
If the url you're providing him in data-href (e.g. short url) is different than the window.location url (url in address bar), then it's probably the case.
P.S. I know that the question is from 2011, but someone else may show up with the same problem.

Why is Facebook returning the wrong page (affects Facebook Like and Share URL)?

When we first put up a blog post, Facebook often (but not always) gets confused about what the page is. Specifically, if you try to use the Like button on the blog page OR if you try to share via the Share link on your profile, Facebook will see the root blog page rather than the actual post page.
For example, we recently posted:
http://thisorthat.com/blog/2010-song-of-the-year-round-1-results
If the user "likes" it, it returns the title for:
"http://thisorthat.com/blog"
When you run the post URL through the FB Linter, you can see the problem.
"http://developers.facebook.com/tools/linter?url=http://thisorthat.com/blog/2010-song-of-the-year-round-1-results"
In the Debug section it shows an extra og:title, og:url, description and og:image (the last 4 rows of the Debug section). This is the meta data from the root directory. What we cannot figure out is why. Why is Facebook seeing the correct meta data on the page and then also pulling the meta data from the root directory (and using that incorrectly to populate the data for the Like button and the Share URL tool)?
One other oddity. FB "figures it out" after a few days. Of course, by that time relatively few people are viewing the post.
UPDATE -- I want to thank Peter Bailey again for his answer, but we also discovered that there was another issue that we had to resolve before the Like button worked.
The issue was that we were displaying the Facebook the Like button on a post that was not yet published. The problem with this is that FB then can't resolve the URL and "guesses" as to the correct URL. In our case, it always guesses thisorthat.com/blog. Unfortunately, it then caches that guess for a number of days and that cache cannot be cleared by the Linter. So the ultimate solution was to both fix the og:type as Peter suggested, but also to remove the Like button from the blog post preview. It's very important that you don't show FB a page before it's published or if you do, change the URL.
Pretty sure it's your Open Graph type that's the problem.
<meta content="website" property="og:type"/>
Per the documentation
Use article for any URL that
represents transient content - such as
a news article, blog post, photo,
video, etc. Do not use website for
this purpose. website and blog are
designed to represent an entire site,
an og:type tag with types website or
blog should usually only appear on the
root of a domain.