Facebook comment plugin
I decided to add a facebook comments plugin on my web site but I encountered the following problem.
According to Facebook specs:
| The Facebook comments box is rendered in an iframe on your page, and most search engines will not crawl content within an iframe. However, you can access all the comments left on your site via the graph API as described above. Simply grab the comments from the API and render them in the body of your page behind the comments box. We recommend you cache the results, as pulling the comments from the graph API on each page load could slow down the rendering time of the page. |
<?php
$url = "http: //developers.facebook.com/blog/post/472";
$request_url ="https: //graph.facebook.com/comments/?ids=" .
$url;
$requests = file_get_contents($request_url);
print "<PRE>";
print_r($requests);
print "</PRE>";
?> As soon as I added this PHP code to the HTML of my page just below the comment plugin code, the comments appeared on the page in a single and very long line.
It looks like this but 100 times longer.
| {"http:\/\/developers.facebook.com\/blog\/post\/472":{"data":[{"id":"10150090402026572_14446097","from":{"name": "Andy Mitchell","id":"501423231"},"message":"The new Facebook comments just launched and are pretty awesome!","created_time":"2011-03-01T17:06:28+0000" |
So when the user lands on my page s/he sees both Facebook comments the way they are supposed to look and all the comments again in the format I showed above. It destroys the layout and just doesn't look right.
Obviously I did something wrong. These pulled comments have to be visible to search engines but must be invisible to the user. (Or not?)
Facebook says: "Simply grab the comments from the API and render them in the body of your page behind the comments box."
What does it mean "behind the comments box"?
How can I solve this problem?
I know that adding hidden content is SEO unfriendly.
I will appreciate any advice!
-
lovenot -
Thanks - 2 replies
SignatureWant to improve your website traffic? Interested in backlinks creation, article writing/submission, autoblogging and more? Check out Licorne Solutions Ultimate SEO and Internet Marketing Software Solutions now!{{ DiscussionBoard.errors[4603238].message }}-
ultimalite -
Thanks
{{ DiscussionBoard.errors[4603497].message }} -
-
ultimalite -
Thanks - 1 reply
{{ DiscussionBoard.errors[4604412].message }}-
ultimalite -
Thanks
{{ DiscussionBoard.errors[4607280].message }} -
-
-
-
qcloud -
Thanks
{{ DiscussionBoard.errors[4735960].message }} -