Facebook Comments

IMPORTANT: Facebook comments isn’t working right now, I’m looking for someone to take over this to make it work. Leave a comment.

Basically a new version can start using the facebook comments API for notes, but will still have to match note ids to wordpress URLs by screen scraping facebook like the original plugin.

Old Info:
For a while I’ve been using Adam Hill’s facebook comment importer, to get comments from facebook back in to my blog. I recently realised it wasn’t working, so I tried Thomas Albright’s edit, no joy there either. Did some debugging and got it working my self. You can download it here: facebooknotes.php.

All new changes have been commented incase they need to be moved back, though I think my version is the only one being actively maintained at the moment.

Change Log:
0.36
Latest fixes for facebook with changes from Benjamin Trice
0.33
Option to not import comments for posts whose comment status is closed.
0.32
Should work for pages and situations where there facebook user specified in wordpress isn’t friends with the commenter on the note.
0.31
Removed debug statement
0.30
Fix for the latest version of facebook!
0.29
Option not to notify (email) of new comments from facebook
0.28
Option to import from every page of notes from facebook, not just the first one.
0.27
Version 2.5.1 introduced that the GUID might not be the permalink (http://trac.wordpress.org/ticket/6492). The plugin now uses a different method for converting the URL to a post ID. Should also fix some earlier problems with the “Original Comment Post Not Found” error.
0.26
Version 0.26 with fix for latest facebook HTML mark up
0.25
Fix added by Aaron Harp to allow thie plugin to work with feedburner


Reader Comments

  1. I tried installing verion 0.21 and I get a “fatal error” when I try to activate the plugin. I am changing the extention of the text file from .php.txt to .php Am I doing something wrong?

  2. haha, ok, while i’ve tired on version 2.1.3 and 2.3.0, not on all version inbetween. hmmm. let me see if I can install that version on my test blog.

  3. It seems that the facebook developers are trying to keep pace with us “hackers”. Since their revenue now depends on ads, FB is trying to keep all functionality WITHIN facebook pages (more ads displayed).

    A bit short-sighted if you ask me.

  4. yea, they’re missing tons of functionality from their API, and I think opensocial is a much better idea.

    I’ve tried the plugin on 2.2.1 and it activates, I’m on php 5+, but I’m not sure its that. Have you tried the older versions of the plugin from Adam’s site? I haven’t changed much of the code, so activation should be the same, so if those work, this should work. I mainly changed some of the regular expressions and things.

  5. I just upgraded to WordPress Version 2.3.1. And I just re-installed v.0.21 for the plugin. I used the “manually import” button and it detected the comments from facebook, it said that the comments were added to the WP database… BUT STILL, they do not show up in my page.

  6. Yes, I tried the 0.1 version on both of my WP version. Hmmm…

    I appreciate your help and time. Please find me in facebook, I could not find you. Thanks bro.

  7. * is there a delay? WordPress is saying that the comments found from FB are already in the database. Nothing shows up. Any ideas?

  8. This is why it is not working. Because although WP detects and imports the comment, it does not associate it with the correct post, as it is shown in the “# 0” at the end string.

    “Nov 25, 10:48 PM — [ Edit | Delete | Unapprove | Approve | Spam ] — # 0”

  9. ha, sorry this is such a hack, there shouldn’t be a delay, the output that say’s they’re in the database only occurs if they have been selected back from the DB, so if you go to your mysql database they should be in there.

    yes, it does seem that maybe they’re not associated with the correct post. They did the last time I tested on mine. I’ll ad a comment from facebook, and try again.

  10. hmmmmm… ok my test comment appears, but the date / time stamp is wrong because it doesn’t take into account the time difference between my blog and facebook.

    I wonder why yours isn’t finding the correct post?

  11. just been going through the code, the plugin detects which post to apply the comment to by using the guid from the database, and comparing with with the url extracted from the facebook “view original post” link.

    if the url fed into facebook from your RSS feed is different from the one in the database, it would fail to find the correct post.

  12. Thanks, James. The problem was that I was using a feedburner plugin to redirect the rss feed to a central location to keep track of subscribers.
    “http://www.feedburner.com/fb/a/help/wordpress_quickstart”

    I was using the rss feed to import posts into FB. That is the reason why the Notes in FB (original posts) and the WP posts were not matching.

    I had other upgrading issues. Resolved them now.

    Conclusion: Plug-in version 0.21 works like a charm. Thanks.

    Dany

  13. Hey patrick I just ran a test posting a comment from facebook and it does support the characters you mentioned.

    Let me know if there’s anything you think isn’t working for you.

  14. I’m running on WP v2.1, and it’s not doing anything for me, not even wrong posts, moderation, nada.
    Maybe I’m having the same prob as aforementioned, because I’m importing my FB from a feedburner feed of my WP site? If so, then.. well, I guess i’ll just have to do a CBA of what I prefer, is there no hope though/then? I think I only had a comment on one of my notes, which was sometime back…

  15. Yes, this seems to be a problem with some people’s setup. Its really hard for me to test and figure out why because it doesn’t do it for mine, and several others. I will keep thinking and working on this problem though.

  16. Hi again,

    My issue appears to be ‘fixed’, so I thought I’d share some information with people who may have been having the same issue.

    I was using http://www.url.com/feed/ as my link in FB and my comments were being imported, but linked to the non-existent post #0.

    I tried again, this time using http://www.url.com/?feed=rss2 – and bingo! Works like a charm.

    Hopefully this can help some other people.

    Cheers,
    T.

  17. Hi James,
    I installed version 0.22 of Facebook Comments onto WordPress v2.3.3, and I can’t seem to get it to do anything.

    When I click “Import Comments Manually,” I get the message “Manually importing comments… ” and then nothing else happens.

    Do you have any suggestions?

    The feed I am importing into Facebook Notes is:
    http://www.bandergrove.com/?feed=rss2

    Thanks for all your hard work on this plugin!

  18. Pete, not sure what happens, check that there are comments attached to post #0, that seems to be a reoccuring problem that happens.

    If its not that, send me a screenshot of the wordpress admin screen when its doing that.

    As i’ve said before, this is a bit of a hack, taken from someone else’s broken code, so it might take a while to figure out all the issues.

  19. I forgot to mention — I don’t have a post #0 on my blog. I deleted it. The earliest post I have is #3. I don’t know if this has any effect.

  20. I’m not sure what happened, but this plugin magically started working today.

    I didn’t change anything on my wordpress blog (I haven’t even logged in / posted in a week and a half). But somehow the comments started coming through.

    Very odd, but I’m not complaining!

  21. really hard to test as it hasn’t done it to my blog and i can’t seem to make it do it, but i think its just happened to one of my friends, so i may be able to get access to debug.

  22. hahaha, good news everyone, my blog is now doing the #0 post thing, so i can really dig into this and figure out what on earth is happening, and hopefully have a solution for everyone!!!!!

  23. hey everyone, so i gather that this plugin can only be used to get your comments from your own individual facebook account, not from groups that you started. is that right? when i set it up and give it my name, password, etc., it keeps telling me that i have to authorize the plugin access before i can continue…even though i fill in all the info. suggestions?

  24. 0.23 New version!
    There’s a new version out, with a couple of changes. Firstly there’s a fix for comments appearing on Post #0. Firstly it won’t import the comments at all if that happens, so you shouldn’t get those appearing in your database. Secondly I’ve changed some of the code to better detect if post URL. Let me know if it works for you.

    Kelly, yep, only from individual accounts, RSS feeds that are setup to import that way. As far as i know, groups don’t support importing feeds via RSS.

  25. I’m also having the same issue (“Error, original comment post not found…)

    But, i’m also having issues with Fotobook (which imports your photo albums from Facebook.)

    the only thing Facebook related, which works for me, is Wordbook.

Write a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.