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
Facebook seriously need an API for this, and for groups.
Ok, another update to facebook’s html broke the plugin again, hopefully I’ll have a fix soon.
Ok its fixed, version 0.21. Also found a bug related to people commenting more than once, which is fixed as well. Can use the same link as before.
This is an example comment from facebook…
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?
yep, should change from .php.txt to .php
What version of wordpress are you using?
I am using version 2.2.1.
I’ve tried on version 2.1.3 to 2.3.0
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.
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.
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.
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.
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.
* is there a delay? WordPress is saying that the comments found from FB are already in the database. Nothing shows up. Any ideas?
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”
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.
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?
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.
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
great, haha until facebook change something and I have to fix things all over again…
can u add support for characters like æøå?
THANK YOU! It’s nice to have this working again :D
Testing other characters æøå hehehe
Hi Patrick, I’ll try and see what I can do, no promises on time though :-)
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.
I just added the plug, and it looks fantastic. Thanks for the time you’ve put into it.
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…
Installed plugin, was working great, but now all comments are going to entry #0 and don’t display. Any ideas?
Neil
Hi, I submit my site to FB Notes with this address: http://blog.url.com/feed/ (url being my website, obviously) – and it import comments, but all say they are for post #0. Have I used the wrong URL for FB?
Thanks!
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.
Thanks! Much appreciated.
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.
I haven’t checked, but it sounds to me the plugin might not be detecting that http://www.url.com/feed/ is that same as http://www.url.com/feed, with no back slash.
Or maybe it has something to do with the GUIDs in the database. I’m a little confused now. I use http://www.url.com/feed/rss/
Ok, I just changed my facebook to use http://www.url.com/feed/ and it still works, so it mst be something to do with the permalinks looking differnt in different feeds, glad yours is working now htough.
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!
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.
Thanks for the quick response! I really appreciate this.
I have posted a screen capture here of what happens right after I click When I click “Import Comments Manually”:
http://www.awsumpixx.com/DOC/misc/bandergrove_facebook_comments.jpg
And the full Facebook Notes address I’m trying to import comments from is:
http://ithaca.facebook.com/notes.php?id=13800780
I’d love to hear any suggestions / advice you have.
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.
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!
So is there still no certain fix for the #0 thing? I’ve tried all the above and still no go… :(
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.
Cool. I’d love to hear a solution for this.
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!!!!!
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?
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.
So, it no longer imports comments with a post of #0, but I can’t figure out how to have it grab any of my facebook comments still. Error, original comment post not found… is what I always get. All my information is correctly entered into the fields. What could be resulting in this problem. My RSS feed is http://blogs.mkcproductions.com/webmastercorey/feed/
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.