Repost Twitter to Facebook through Losant and IFTTT
Twitter and Facebook are two primary social networks that I regularly use. Despite many arguments against synchronizing contents across different accounts, I still think it's beneficial to repost my tweets onto my Facebook timeline. There are already many solutions to achieve cross-posting between Twitter and Facebook, but they are not ideal, because I'm very picky on what I want:
- I want to cross-post from Twitter to Facebook, not the other way around.
- I want to tweet with native Twitter clients, not through a third party website or app.
- I don't want those tweets created by my Swarm check-ins to be re-posted onto Facebook, because Swarm app can directly post to Facebook.
- For plain text tweets, I want them as plain text Facebook status updates, without a link to Twitter which could only confuse my Facebook friends.
- If I tweet a photo, I want that photo to be uploaded to Facebook, instead of posting a link on Facebook.
- If I tweet a link to some webpage, I want Facebook to display a preview of the webpage.
IFTTT is one of my favorite online services. It allows me to create a recipe for certain automated actions. The name "IFTTT" stands for IF This Than That, where This could be "posting a new tweet", and That could be "posting a Facebook status". However, IFTTT does not allow filtering: I couldn't specify conditions like "the tweet is not posted by Swarm", which is necessary to achieve my goals. Therefore, I need a more advance solution to repost my Twitter feed to Facebook.
This year the world is greeted with Losant, an Internet of Things platform that allows makers to connect their sensor devices, collect data into the cloud, and take actions through workflow execution. While neither Twitter nor Facebook has anything to do with IoT, Losant workflow has some great capabilities that makes it suitable for non-IoT usage:
- trigger execution from a timer or an HTTP request
- parse and stringify JSON
- send HTTP request to any server
- store execute state in a variable
- most importantly, execute raw JavaScript!