I have experimented for a couple of weeks now trying to find a reasonable way to automatically post WordPress blog entries to a facebook profile. It turns out that the facebook “Notes” application can automatically import blog entries if you provide an RSS feed. Unfortunately, this duplicates content rather than directing traffic back to your blog site. A byproduct of this approach is that most facebook users will leave comments under the facebook note rather than the actual blog entry. Furthermore, blog owners may want to selectively post entries to facebook, rather than automatically posting all of them.
The solution I finally settled on makes use of two different tools to alleviate some of these problems. The first of these is the Feed Facebook, Leave Facebook plugin. This extension for WordPress generates a feed with modified content, where the resulting entries (A) contain only excerpts rather than entire blog entries; and (B) contain a link back to the actual entry on the blog website. Once the plugin is activated, standard feed URLs can be modified to generate the new facebook-friendly feed. The simple modification looks something like this:
BEFORE http://www.your-site.com/feed/Of course, different WordPress sites may have their feeds specified differently than this, but the general idea is the same. There are a couple of additional plugin parameters you can use to customize the output, but I was unable to get them to work correctly so I tweaked the source code to force the wording I wanted.
AFTER http://www.your-site.com/feed/?feedfacebook
Once all of this was in place, I needed a way to direct only selected postings to facebook. I decided to make use of the standard WordPress tag management system to do this. I defined a new tag called facebook-autopost, and assigned this to posts I wanted to have imported to facebook. Since WordPress automatically defines individual feeds for each tag, you simply need to use that feed URL as the basis for the final URL that you enter into the facebook “Notes” application. In the scenario presented above, it will look something like this:
FINAL http://www.your-domain.com/feed/?tag=facebook-autopost&feedfacebookThe only piece of this puzzle I haven’t tested involves new entries. The facebook “Notes” application is supposed to periodically check the feed to see if new entries are available. I guess I’ll use this post to see if that is working as advertised.
A quick followup. All of this was working fine for me until I installed the “FD Feedburner” plugin. In hindsight, it makes sense that this would cause problems. The new plugin is designed to redirect all site feeds through FeedBurner. After about a day, facebook imported *ALL* of my posts and bypassed the “Feed Facebook, Leave Facebook” plugin completely… resulting in a large number of posts suddenly appearing under my facebook “Notes” tab.