Feed Facebook, Leave Facebook

Facebook is shutting down its RSS import feature on 22 November 2011. This plugin will still work, but you will no longer be able to use Facebook as your import service. For alternative import services, try: Twitter Feed, RSS Graffiti (I have no experience with either of these.)

Feed Facebook, Leave Facebook is a plugin for WordPress to generate a separate partial feed for use on Facebook. Use it to direct Facebook visitors to your blog while leaving your main full-text feed intact.

If you’re a (reluctant) Facebook user and you’re unhappy with the way it handles your feed, use this plugin to generate a special excerpts only version for Facebook. It will also add a link to your blog post beneath the excerpt in case visitors miss the ‘View original post’ link Facebook provides.

Download — Latest Version

Installation (for WordPress 2.8+)

The easiest way to install the plugin is to install with plugin installer (enter your WordPress address).

If you want to do it manually:

  1. Upload the feed-facebook-leave-facebook directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Once activated, access your feed with the querystring feedfacebook appended to the end. This is usually
http://[your blog address]?feed=rss2&feedfacebook — if you use pretty permalinks, it could also look like this: http://[your blog address]/feed/?feedfacebook

You can register the new feed URL with Facebook on its Import a Blog page.

Customise

To customise the message, add it to the querystring:

?feedfacebook=Read the rest at my site

If you want to explain to your readers why you’re asking them to leave Facebook to read your post, you can add that with the following:

?feedfacebook&why=URL of explanation

This will appear as a link with the text ‘(why?)’. To change the wording:

?feedfacebook&why=URL of explanation&whytext=Facebook is evil!

Screenshot

Examples of Feed Output

Questions?

If you find this piece of code useful, please consider donating. I’m a student working on these projects in my spare time. This site carries no advertising and I release most of the code I work on under a free software license. I don’t receive any payment for this work so I have to rely on donations if I want to put off becoming a wage slave. Your contribution (whatever the amount) would be greatly appreciated.











Paid Support

If you run a commercial site and you need help with feeds. Feel free to get in touch: keyvan (at) keyvan.net

47 Comments

  1. Digigirl says:

    I have installed the plugin, but am trying to figure out how to make the nice little feed you show in your example. When I test the blog import at Facebook, it imports EVERYTHING – pictures, the whole entire post, all the related posts, etc. How do you limit what is imported?

  2. Keyvan says:

    Digigirl: If you’ve installed it and activated it, you simply attach ?feedfacebook to the end of the feed URL. For this site it would be http://keyvan.net/feed/?feedfacebook. It looks like you’re using a plugin to redirect all your WP feeds through feedburner. If you are, let me know the name of the plugin and I’ll see if there’s a way around it.

  3. Hey there,
    Thanks for the great code. I’ve been looking for something just like this forever. But from what I understand plugins are only available for people who use custom CSS. Is it possible for ‘regular’ wordpress.com users to use this feature?
    Thanks!!!

  4. Keyvan says:

    Jackie: Unless they install this plugin for all WordPress.com users, you won’t be able to use it. I can think of two solutions which should work with your wordpress.com feed. Either switch the entire thing to excerpts only — you should be able to do that in your WP admin page. Or, if you’d still like to let regular RSS users subscribe to a full-text feed, you can try creating a feedburner account and let them create an excerpts-only copy of your feed. See here for more on how to do this: http://www.joereifer.com/words/?p=552

    Hope that’s some help.

  5. Digigirl says:

    Thanks Keyvan! I did use the correct url per your instructions (http://www.5yrplan.com/feed/?feedfacebook) and it still pulls in the entire page. I am using Feedburner Feedsmith. If you can figure out how to make it work with that, it would be awesome! The only other plugin we’ve found for this function doesn’t work very well and has no support. Thanks!

  6. Keyvan says:

    Digigirl: I’ve just released version 1.0 which should override Feedsmith when you request a facebook feed. Please try it out and let me know if it works. You might have to clear your cache first.

  7. Digigirl says:

    Keyvan, that worked perfectly! Thanks so much!

  8. Keyvan says:

    Good to hear! πŸ™‚

  9. Jason Small says:

    Hi Keyvan,

    I have been looking for a plugin like this = awesome.

    But I am having the same trouble someone posted above – the feed comes in, but I am using a feedburner plugin, called Feed Stats. So it brings in the entire post. Is there a workaround please?

    Your plugin is great – because it brings the traffic from Facebook, without putting the content on Facebook for all to read. Then you lose the ad revenue!

    Thanks
    Jay

  10. Keyvan says:

    Jason: thanks for the comment. I was hoping there wouldn’t be too many feedburner plugins. It looks like there may be. I don’t really want to get into a situation where I’m simply updating the plugin to make it compatible with other plugins. If I get time and enough requests for these changes then I will consider it. But at the moment this plugin isn’t high priority for me.

    Of course if you or anyone else wants these changes, then I can help but I’ll have to start charging.

  11. Jason Small says:

    Thanks Keyvan – hey, you have a skill – you should charge for it! We are used to getting a lot of things for free on the web now, but this stuff takes time and knowledge to build. I understand. I will keep searching for a different plugin for Facebook – but if your can ever work with Feedburner, I would be all over it!

    Thanks again!
    Jay

  12. Cahya says:

    I have use this plug-in now, and it works great. Before I used the wordbook, but seem it can not show part of my post on facebook update (only showing the title).

    But since your plug-in use the notes on facebook, it can not handle mutiple blog address, can it?

  13. Keyvan says:

    Cahya: that’s more a limitation of Facebook — it only lets you register one feed. Some people get around it by using services which combine multiple feeds into one. Thanks for the comment.

  14. Cahya says:

    Yes, I guess so. I have been using simplaris blogcast till now, can I put this feed on simplaris too? I mean not by using facebook’s notes but another application that able to read feed?

  15. Keyvan says:

    Cahya: yes you can. The resulting feed can be used with any service you like — the plugin does not communicate with Facebook in any way. The only reference to Facebook is the default message which you can override easily with your own message. I should actually make that clearer on this page. πŸ™‚

  16. Cahya says:

    Thanks, I have try it on Simplaris Blogcast, and it works fine. Now I guess I shall use Simplaris Blogcast with your plug-in for my WordPress.Org’s Blog, and facebook’s notes for my Blogspot.Com’s Blog (I just can’t made it work: to auto publish blogspot feed on blogcast).

    Well, it may be different from it originaly purpose by using facebook’s notes, but it still you have my best gratitude for your great work.

    Thank you very much πŸ™‚

  17. Keyvan says:

    No problem Cahya. πŸ™‚

  18. Digigirl says:

    Is there a delay from time of posting until it feeds over to Facebook? When I first installed it, it brought over the two posts I had at that time. Then I added something else to Facebook. Now I made a new post on my blog, and the post didn’t go over to Facebook.

    Did adding something else (a poll) to the Facebook wall break the feed? or does it take some time to catch up with the blog?

  19. Keyvan says:

    Digigirl: how quickly new posts appear on Facebook will vary because Facebook has to fetch the feed to see the changes. I don’t know how frequently Facebook does this so sometimes your posts will appear almost instantly, e.g. if you post just before Facebook checks for updates to the feed, and other times it will take longer, e.g. if you post just after Facebook has checked your feed. Ultimately, Facebook decides how frequently it polls the feeds.

  20. cathy says:

    This is a great plug-in. You might add to your instructions that permalinks have to be set up, or at least a mod_rewrite for http://blogurl/?feed to http://blogurl/feed/

  21. Keyvan says:

    cathy: thanks! As for requiring permalinks, that shouldn’t be necessary. The plugin should work whether you enable permalinks or not. The URL will simply look a little different: http://blogurl/?feed&feedfacebook — did you have trouble running it without permalinks?

  22. cathy says:

    Yes, I tried http://blogurl/?feed&feedfacebook before enabling permalinks and I just got the regular RSS2 feed.

  23. My blog feed is http://dambrot.com/criticalthought/?feed=rss2. I’ve tried every combination I can think of (e.g., http://dambrot.com/criticalthought/?feed=rss2/?feedfacebook) but the Facebook blog importer keeps returning the message

    Import Failed
    We couldn’t find a feed using the URL you provided.

    Note: the importer works fine with my unmodified blog feed URL.

  24. Keyvan says:

    Cathy: which version of WordPress are you using?

    Stuart: it does work for your feed, you just need to change the last question mark into an ampersand: http://dambrot.com/criticalthought/?feed=rss2&feedfacebook

  25. Great – thank you very much.

    One more question before I confirm the import: will I be able to easily cancel the imported blog AFTER confirming it?

  26. Keyvan says:

    Stuart: Your blog posts will be imported as Facebook notes and your feed will be monitored for future posts. You can stop Facebook monitoring the feed (ie. cancel) or give it a different feed to monitor. That won’t delete what’s been imported already but you can do that by deleting individual notes — not sure if there’s an easier way to delete all imported posts.

  27. Never mind – s’all good.

  28. we crossed comments – thanks again

  29. Martin says:

    Hello Keyvan,

    it looks like the perfect solution for what I have been searching. Anyway, I would need to have it translated. I could do it by myself, but I would need to be sure that future update won’t break it.

    Thank you in advance!
    Cheers!

  30. Keyvan says:

    Martin: Thanks. The default text is in English but you can easily override that through the query string without modifying any code. If you’re okay doing that then future changes won’t affect you.

  31. Eric says:

    Hi Martin – I love your plug-in as I don’t want FB to own my pix and text. Fantastic. I got it to work right away – no problems. And it drives traffic to my site! Cheers – Eric

  32. Martin says:

    Keyvan: Thank you for the suggestion. Do you have a link to quick how-to guide? I haven’t used this solution in the past. Or you could just e-mail me a hint how to do it? Thank you in advance!

    Eric: It wasn’t me! Really! πŸ˜€

  33. Keyvan says:

    Eric: Thanks! (I’m guessing that message was intended for me). πŸ™‚

    Martin: In the customise section of this page I show how you can pass your own message in the query string: ?feedfacebook=Read the rest at my site — simply change ‘Read the rest at my site’ to whatever message you want in your own language. Hope that makes sense.

  34. Martin says:

    Keyvan: Thank you! This is only partial solution in my case. As there is a text saying “Read more…” and it stays in there after my translated phrase. But the problem is probably somewhere else. Anyway, thank you very much for your support! (If you have any clue where the text originates, please let me know.) πŸ™‚

  35. Keyvan says:

    Martin: I think you’re right about the problem being somewhere else. Unfortunately I don’t know what’s causing it. It could be another plugin. Does it appear in every feed item or only on a few?

  36. Daniel says:

    Hey, I just got this setup on wordpress and facebook, now when I inport the feed. the “Leave Facebook to read the rest on my blog” part is in plain text when viewing in facebook. put the feed url in IE, and it look fine

  37. Martin says:

    Keyvan: The “Read more…” appears everywhere.

    Anyway in the meantime I have found out another issue on other web page: I’m using an FD Feedburner Plugin and it always runs before yours, meaning my whole feed is being sent out (through Feedburner). Is there a way to tell the plugins in which order they should run?

    Thank you!

  38. Keyvan says:

    Daniel: That’s strange. It could mean Facebook has decided to strip links from feed items, but I don’t know why they’d do that. Is this happening to anyone else?

    Martin: Compatibility between plugins isn’t always resolved by telling one to run before the other — it depends how they’re implemented. The official Feedburner plugin for WordPress (FeedSmith) redirects all requests for feeds to the Feedburner URL. If that’s all you’re trying to do, you should try using that as this plugin overrides it when you request a feed for Facebook.

  39. Daniel says:

    Keyvan:

    I don’t know if it doing it to others, but the title of each post will come up as a link, so at lease that work. I’ve made some changes to see if I can fix it, but yeah I thought i’d let you know.

    Daniel πŸ™‚

  40. Daniel says:

    Jest a quick note, I can’t seen to fix this. Anyone having the same issue?

    Daniel

  41. […] the Feed Facebook, Leave Facebook plugin to create a custom RSS feed (with brief article text and a link to the original […]

  42. […] Documentation – including how to customize the layout even further Related posts […]

  43. Jon says:

    I got your plug-in to work without any hassle at all; however, there is one important aspect of this plug-in that I do not understand. Why is the URL “Read the rest at my site” not added to the text seen on the mini-feed?

    BTW, running WordPress 2.8.4. Your plug-in works like a charm πŸ˜‰

  44. Keyvan says:

    Jon: I’m not completely sure I know what you mean. If you mean why is the link not clickable in Facebook when you’re viewing your wall, it has to do with the way Facebook deals with feeds. It would be nice if Facebook handled feeds better and took you straight to the post URL instead of taking you to the excerpt and then displaying the link.

  45. Jon says:

    You’re right … it does show, and as you say it’s not active unless you click the feed to see the excerpt. Fine by me …

  46. Kevin says:

    This is perfect….The only glitch I have on my feed is when you click on the “read it on my blog” link it stays in a FB frame?

  47. Keyvan says:

    Kevin: For me the link points to Facebook’s redirect script which then redirects to the correct URL – I see no Facebook frame. The URL begins with http://www.facebook.com/note_redirect.php?…

  48. Love this plugin. One suggestion: ability to set excerpt length. Would be great. Thanks for a great plug.

  49. […] I wanted my FaceBook account to automatically import my WordPress blog… this was easy to set up however it did not work with photos and instead of linking directly to my blog with a snippet about what my post was about FaceBook would link to a page with only the title of my blog post and a small hidden link that nobody was finding. So of course nobody could see any pictures or read my full blog post which made the whole thing pointless. I lived with it for a couple months and tried something new today. The plug-in is called “Feed FaceBook Leave FaceBook” and the website is here:Β  http://keyvan.net/code/feed-facebook-leave-facebook/ […]

  50. Shannon says:

    Hi-Great plug but I’m having the same issue as other people-it’s pulling the whole feed. When you suggested clear the cache, did you mean on my computer or on the actual word press server?

3 Trackbacks

  1. […] the Feed Facebook, Leave Facebook plugin to create a custom RSS feed (with brief article text and a link to the original […]

  2. […] Documentation – including how to customize the layout even further Related posts […]

  3. […] I wanted my FaceBook account to automatically import my WordPress blog… this was easy to set up however it did not work with photos and instead of linking directly to my blog with a snippet about what my post was about FaceBook would link to a page with only the title of my blog post and a small hidden link that nobody was finding. So of course nobody could see any pictures or read my full blog post which made the whole thing pointless. I lived with it for a couple months and tried something new today. The plug-in is called “Feed FaceBook Leave FaceBook” and the website is here:Β  http://keyvan.net/code/feed-facebook-leave-facebook/ […]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Subscribe without commenting