So today I spent pretty much all day setting up a feed from my pumpkin site into its new Facebook page.
It shouldn’t have taken all day – it was really only supposed to take a couple of hours, by my calculations, but apparently Facebook’s Open Graph protocol is a gigantic pain in the ass. Or the new WordPress Facebook plugin is a pain in the ass. I’m honestly still not really sure which…
In the past I’ve always done this by using a Facebook app that uses the site’s RSS feed, but it always seemed inefficient, there was the inevitable lag time from when I posted a new article to when the service actually checked for updates, and I’m not really a huge fan of relying on lots of 3rd party hosted services anyways, so it made sense when I started seeing push to Facebook-style plugins for WordPress popping up that eventually I’d move to using something like that, too. And since pumpkin didn’t even have a page of its own yet, this seemed like a good opportunity to experiment and find the best one to eventually roll out to all of the other sites as well.
Boy, did I not know what I was getting myself into!
Part of my problem was that a few months ago I started experimenting with an Open Graph plugin that simply adds all of the OG tags to your pages – it doesn’t do any actual publishing, but at least it puts the tags out there because otherwise when somebody shares a link to one of your articles on Facebook, the site has to crawl the page to figure out what to show for the title, description, thumbnail image, etc…, and the results of that crawl aren’t always that great. Or at least that was my experience, so I installed that plugin and was more or less happy with the results that I was getting.
Fast forward to today when I needed to figure out the publishing part. My first stop was the official Facebook plugin for WordPress because it was new and shiny and seemed to have some neat features like mentions and messages that other plugins didn’t.
Unfortunately, it also has a couple of ugly bugs that I personally decided I couldn’t work around – namely, it wasn’t selecting the correct image for the post’s thumbnail, it was doubling up the description, also somehow it was including HTML markup in one of the copies of the text in the description. Eventually I learned that apparently I had conflicts from two different plugins both inserting duplicate Open Graph tags into my pages, but even after disabling the first plugin, I was still getting the goofy double results with no end in sight. And it was really bizarre – posts would appear fine if I copy & pasted the link into Facebook, but when I had the plugin post as if I was publishing a new article, I’d get the bad results.
I honestly fought with this for a while and even considered trying to migrate some of the features that I liked from the other plugin into this one, but after probably a good 6 hours I finally decided that enough was enough and I’d need to move on to something else – a pain because I really wanted to use the official plugin, but I still had other writing to do, too! 😯
So next I moved on to a plugin called Simple Facebook Connect, which was just about perfect except for one kinda dumb, little detail – for some reason, the link used to post to Facebook wasn’t the properly formatted permalink, but instead the original WordPress link (i.e. /?p=12345 instead of /blog/post-name/). That bugged me and I found a recent post from the developer citing that he had no plans to change it anytime soon, so I didn’t get too attached and kept looking…
FINALLY I settled on this older plugin called Facebook Page Publish and after some quick testing, I concluded that it not only did it format everything the way that I was looking for, but it also somehow posts them as links rather than as application posts, so they’ve got the little embedded box as if I had actually just copy & pasted links into the page like I first started, which I kinda like. The settings that I’m using look something like this:
I probably should’ve also taken some screenshots along the way to show just how anal I was about getting the formatting just right, and I’m honestly still not 100% satisfied with my results because I read that Facebook likes to tweak Open Graph a lot, so there’s a good chance that my posts could stop working at just about anytime, but at least for right now, it seems to be working ok. 😕
One other tool that I’ll share that helped me a lot to really pinpoint where my problems were – Facebook’s debug tool essentially takes any URL that you feed it and spits back the Open Graph results that it reads off the page, whether through analyzing the page or even just reading the tags from your header directly. I guess this is also supposed to flush out the cache for a given URL, which was a suspect for me at one point when I couldn’t seem to get the post thumbnails even remotely close to being accurate!
Ultimately, big wall of text translates to about 10 hours total fighting with Facebook and WordPress … but who knows, maybe your site will be different and the tags will automatically populate correctly based on your own formatting styles the first time around!!! I hear the official plugin works better if you use featured images in your posts instead of embedded images like I do with this site…
Woof – I don’t even want to think about it anymore. Onward, to something else … anything else! 😯