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

100 Comments

  1. Posted 29 July 2009 at 6:18 pm | Permalink

    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. Posted 29 July 2009 at 7:29 pm | Permalink

    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://www.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. Posted 31 July 2009 at 3:49 am | Permalink

    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. Posted 31 July 2009 at 9:54 am | Permalink

    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. Posted 8 August 2009 at 12:15 am | Permalink

    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. Posted 8 August 2009 at 1:31 am | Permalink

    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. Posted 8 August 2009 at 4:27 pm | Permalink

    Keyvan, that worked perfectly! Thanks so much!

  8. Posted 8 August 2009 at 11:10 pm | Permalink

    Good to hear! :)

  9. Posted 9 August 2009 at 8:33 am | Permalink

    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. Posted 9 August 2009 at 10:07 am | Permalink

    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. Posted 10 August 2009 at 7:22 am | Permalink

    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. Posted 17 August 2009 at 7:23 pm | Permalink

    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. Posted 17 August 2009 at 8:17 pm | Permalink

    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. Posted 17 August 2009 at 9:00 pm | Permalink

    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. Posted 17 August 2009 at 9:33 pm | Permalink

    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. Posted 17 August 2009 at 9:54 pm | Permalink

    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. Posted 17 August 2009 at 10:40 pm | Permalink

    No problem Cahya. :)

  18. Posted 19 August 2009 at 12:34 am | Permalink

    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. Posted 19 August 2009 at 12:52 am | Permalink

    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. Posted 19 August 2009 at 5:02 am | Permalink

    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. Posted 19 August 2009 at 5:50 am | Permalink

    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. Posted 19 August 2009 at 4:42 pm | Permalink

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

  23. Posted 23 August 2009 at 1:33 pm | Permalink

    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. Posted 23 August 2009 at 2:31 pm | Permalink

    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. Posted 23 August 2009 at 10:42 pm | Permalink

    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. Posted 23 August 2009 at 11:29 pm | Permalink

    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. Posted 23 August 2009 at 11:30 pm | Permalink

    Never mind – s’all good.

  28. Posted 23 August 2009 at 11:31 pm | Permalink

    we crossed comments – thanks again

  29. Martin
    Posted 4 September 2009 at 5:19 pm | Permalink

    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. Posted 6 September 2009 at 2:10 am | Permalink

    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. Posted 6 September 2009 at 6:20 am | Permalink

    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
    Posted 6 September 2009 at 5:56 pm | Permalink

    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! :D

  33. Posted 6 September 2009 at 7:00 pm | Permalink

    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
    Posted 6 September 2009 at 8:30 pm | Permalink

    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. Posted 6 September 2009 at 10:12 pm | Permalink

    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
    Posted 7 September 2009 at 3:03 am | Permalink

    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
    Posted 7 September 2009 at 5:52 am | Permalink

    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. Posted 7 September 2009 at 10:26 am | Permalink

    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
    Posted 8 September 2009 at 6:27 am | Permalink

    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
    Posted 10 September 2009 at 3:59 am | Permalink

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

    Daniel

  41. Posted 22 September 2009 at 8:55 pm | Permalink

    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 ;)

  42. Posted 22 September 2009 at 10:12 pm | Permalink

    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.

  43. Posted 23 September 2009 at 7:52 am | Permalink

    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 …

  44. Posted 26 September 2009 at 2:38 am | Permalink

    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?

  45. Posted 26 September 2009 at 12:46 pm | Permalink

    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?…

  46. Posted 2 October 2009 at 11:00 am | Permalink

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

  47. Posted 8 October 2009 at 11:37 pm | Permalink

    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?

  48. Posted 9 October 2009 at 2:15 am | Permalink

    James: Thanks for the suggestion. Will think about it.

    Shannon: I tried your site and it seems to be working: http://www.showmethemom.com/feed/?feedfacebook

  49. Posted 14 October 2009 at 10:33 pm | Permalink

    Keyvan, this is such a useful plugin. I love that I can retain all formatting and links like I intended instead of relying on FB’s stripped “notes”.

    One question:

    Is there any way to have the plugin feed link directly to the blog homepage, instead of to the specific blog post?

  50. Posted 15 October 2009 at 12:55 am | Permalink

    Chris: Thanks! As for your question, I’m sure there is a way to do that but I don’t really have time to look into it at the moment. I’m guessing adding a filter to the_permalink_rss and overriding the value with your blog URL would work – I haven’t tested it though. Also, I’m not sure how Facebook would treat the links. It might ignore new entries if the URLs match previous entries.

8 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://www.keyvan.net/code/feed-facebook-leave-facebook/ [...]

  4. [...] but I didn’t want the entire post as the ‘note’. I found a great plugin called Feed Facebook, Leave Facebook that leaves a partial feed with a link to ‘leave Facebook’ to your site. This is [...]

  5. [...] ein Link zur Plugin-Homepage: http://www.keyvan.net/code/feed-facebook-leave-facebook/ … other posts by [...]

  6. By Blogging for Writers | Belinda Crawford on 16 September 2010 at 1:33 am

    [...] Post to twitter and Facebook. I’ll say it right up, I’m not a fan of either, but many people are and they offer a great platform for say “Hi, I’m here, check me out”. So every time I post something new a link to it goes up on Facebook and Twitter. I’ve used some WordPress plugins to automate the task for me, Twitter Tools and Feed Facebook, Leave Facebook. [...]

  7. [...] install and activate the Feed Facebook, Leave Facebook [...]

  8. [...] to get posts from your blog to appear as posts on your Facebook wall. My previous solution, Feed Facebook, Leave Facebook, took almost a month between the time when the article was posted on my blog and it finally found [...]

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=""> <strike> <strong>

Subscribe without commenting