Tweeting from an embedded device with OAuth


I would like develop an application i.e to tweet a message form an embedded board. I am using Spansion based MCU along with redpine WiFi which sends the information wirelessly, my processor is arm cortex based M4. my part number of mcu is MB9BF566LQN. RAM 64k and ROM 512k. I am developing this in CooCox IDE. The whole application is being developed in c language.

Is there any way how to tweet a message form an embedded device to twitter?
my aim is to tweet a message in to twitter form an http post request. Will the OAuth library porting is required or not? or can we use REST api’s directly to post a message form our device?
if porting is needed then what are the memory constraints required for porting?
Is there any porting guidelines available?

could anybody help me out?


Hi there, great question!

In general I’d suggest looking at other (link1) similar (link2) solutions (link3) such as where an Arduino has been made to Tweet. Unfortunately yes, you do need to use SSL and OAuth with the Twitter API.

A pattern I’ve seen used in Internet of Things style solutions is to use a proxy of your own to provide access to the Twitter API - for instance, using a lightweight protocol like MQTT from the device, to post to a service like Node-RED which handles the HTTP communication with Twitter’s API.

It certainly is possible to do the OAuth piece on a smaller device as the Twitter library for Arduino proves, but you may be limited by memory etc.