using yahoo pipes to beautify facebook imports

UPDATE: Almost everything in this post is out of date and probably therefore wrong. I don't use facebook anymore, but I know their API has changed about a million times since this was originally posted. Storytlr is apparently still around but in a different form. You mileage is very likely to vary.

I use facebook all the time. I pretty much hate every minute of it, but it's where everybody is, so what are you going to do. One of my major pain points is that I like to show stuff off, but I categorize my stuff across services. I have 3 blogs on different subjects, then there's tumblr, delicious,, etc.

services that facebook will importYou'll notice that there's only one blog/rss feed available, with no ui to add a second. And there's no tumblr either. So, that's easy, right? Just use a service like storytlr to combine up your feeds, then import it's feed. Simple. (I have one of those, btw)

Except it doesn't work. Facebook not only has only one rss importer, it has one crappy rss importer. Maybe storytlr's feed is slightly malformed, I haven't attempted to validate it. It does work fine in every feed reader everywhere, so I figure it's not very broken.

Anyway, Yahoo pipes to the rescue. My first attempt was pretty simplistic. It looked like this:

simple pipeAnd it worked up to a point. It succeeded in joining all the feeds together and getting the content on facebook. But facebook imports have this other quirk. The link, permalink, etc go unused. They basically use the title and the description. If everything you want to say is not in the description there is no way to get to it.

Facebook strips out embeds.

beforeBefore (that link goes to a facebook page)

So for videos on tumblr you get the title, and the 'uploaded by' string. That's it. I knew there must be a way to tart up my pipe to get something working. It took more digging around than I expected, because it's not immediately intuitive. But it works like this:

yahoo pipe combining feeds for facebookThe 'magic' is in the Loop element. It's wasn't obvious to me at first how to use it to modify the feed in place. But the concept is simple. The Loop goes through each item in it's input, and does the thing in it's box.

In this case, a String Builder lets me replace the description with a big long string made up of hand typed strings and fields from the item. It's not pretty, but I've got the link shoved on the end of my description.

afterAfter (look at that link!)

The union thing lets me do this only for tumblr, which is the only feed I have a problem with. Kind of a hack, true, but honestly that's what pipes is for.

No comments: