DIY Your Own Auto-Posting Service on Twitter and Facebook

I enjoy reading quotes, concise and thoughtful ones, as IT workaholics like me are busy and quotes are easy to be consumed; they get me inspired quickly or start off the day with clarity.

To pay my respect and contribute, I wrote a few Windows and Linux scripts (documented below) and established these quote delivery services on Twitter and Facebook in February 2011:

This blog post describes the previous (v1, v2) and current (v3) designs of the services as well as sharing the scripts written to implement them. Unlike paid social media automation tools or services that are more user-friendly, this post demonstrates a more advanced technique; it is completely free of charge, but could be more friendly to system admins, IT pros or experienced tech enthusiasts than general users.

Flow – How It Works

image

Every day, a quote-sending script is run on a schedule using Task Scheduler (Windows) or cron (Linux) to compose a tweet (or a blog post for the earlier version) containing a quote taken from a text file (database) which in turn gets synchronized to multiple social media platforms using various free third-party web services.

Synchronization with Twitter, Facebook, and Blogger

Thanks to free and readily available cloud-based/on-premises social media automation tools, there is no need to code much. The v1 implementation made use of GoogleCL, an open-source cross-platform command-line utility which supported posting to Google services such as Blogger, while the final destinations, Twitter and Facebook, were synchronized with Blogger posts with help from other services such as FeedBurner Socialize and the built-in Facebook synchronization support of Twitter. By doing so, posting once on Blogger automatically posted on Twitter and Facebook, achieving automated synchronization across the three services.

Flow – v1 Implementation

image

  • Script (GoogleCL) > Blogger > FeedBurner > Twitter > Facebook sync of Twitter > Facebook

Script Download – v1 Implementation (Windows)

Script Download – v1 Implementation (Linux)

However, things in the cloud change too fast. Some time ago, GoogleCL, the base of the script, stopped working due to a change in the Open Authentication (OAuth) mechanism from Google's side.

After the change, the v2 implementation make use of twt.exe, a Windows-based command-line tweeting utility to tweet first (thankfully a lot of good quotes are within the character limit imposed by Twitter) and then synchronize content with Blogger and Facebook using an IFTTT recipe called “New Tweet to Blogger” and the native Facebook synchronization of Twitter respectively.

Flow – v2 Implementation

image

  • Script (twt.exe) > Tweet > IFTTT recipe: “New Tweet to Blogger” > Blogger
  • Script (twt.exe) > Tweet > Facebook sync of Twitter > Facebook
2018 Update: Since August 2018, the automatic tweet sharing from twitter to facebook stopped working, as announced by Twitter.

"Twitter Announcement: An update to the Facebook Platform Policies ended the ability to automatically post Tweets to your Facebook profile or page."

Therefore, the flow has been slightly changed. Instead of sharing directly from Twitter to Facebook, now it shares from Twitter to Blogger (as before) and from Blogger to Facebook using IFTTT (recipe name: "from blogger to facebook pages").

Script Download – v2 Implementation (Windows)

2019 Update: Due to strengthened TLS requirements imposed by Twitter in 2019, this IFTTT mail-to-tweet recipe along with a PowerShell email client has replaced the command-line Twitter client, twt.exe (lacking support of TLS 1.2), where described in the v2 implementation.

Script Download – v3 Implementation (Windows)

The current implementation (v3) with the above modification (quotes_en.bat and send-mail-en.ps1) can be found on GitHub at https://github.com/wandersick/ws-quotes

Conclusion

While there are GoogleCL alternatives like twt.exe and the native mail-to-blog function of Blogger (used with a command-line email client such as blat.exe or PowerShell) which allowed the quote services to resume, GoogleCL was irreplaceable in that it was more feature-rich. For example, it supported tags (turned into hashtags on Twitter and Facebook) which allow more granular categorization of posts, which is unsupported by the other approaches.

If you love quotes like I do, you may now build your own service with quotes you love with the above script and approach. Consider turning on Twitter mobile notification to have the quotes instantly pushed to your devices to (hopefully) get you inspired. Feel free to share your ideas with me by leaving a comment.

Comments