Well, I just have a pretty straight question:
How do I display recent comments from Facebook Comments social plugin on my website?
I have integrated the facebook comments social plugin on my wordpress blog and I just want to put a widget on my sidebar that displays the recent comments from the social plugin.
Thanks!
The social plugin has some ways to change its layout, but all of them will allow the user to write a new comment. One way to get only the comments is by FQL.
To use it, include the facebook all.js on your code (I guess you have it, once you’re using the social plugin) and do the following:
First create a div with class ‘comments’:
Then, do the following in javascript
If your div has a class that is not comments, just replace
$(".comments")with$(".your-class"). This code will create several elements with class comment inside your comments element.I’m using jQuery to iterate the comments.
Hope it helps!