Microblogging

Manton Reece recently shared his microblogging setup with WordPress. I have a similar system that was inspired by Jeremy Keith's example. Like Manton, I had to figure out the quickest way to create a new post. I eventually settled on SMS-to-post thanks (once again) to Twilio. SMS-to-post lets me text my Twilio number which sends the text to WordPress where it becomes a new "note". Publishing that "note" to Twitter is just a matter of hooking into the WordPress publish_post action and sending the post to Twitter via its API.

Here are a few other implementation notes:

  • I created a custom post type in WordPress called "Notes".
  • The post status API makes this entire process smooth.
  • SMS-to-post has a few gotchas, the biggest one is that SMS with emoji are limited to 70 characters.
  • I don't have an RSS feed for my Notes...yet
  • I save the tweet ID of every post that gets posted to Twitter. I use that ID to pull in the favorite and retweet counts and display them next to each "note" in the WordPress dashboard.
  • Twilio needs an endpoint to POST incoming texts to WordPress. Creating custom endpoints is trivial thanks to this great guide. I also recommend the rewrite rules inspector plugin for working with rewrite rules.
Have a comment? Send an email to my public inbox. Please follow proper mail etiquette.