Berichten met tag ‘twitter’

SMS to Twitter

31 maart 2010 Reacties uit

I’ve wrote this shell script that uses an SMS to post to Twitter. It is ment to be used as an Eventhander for SMS Server Tools, but it’s simple enough for stand alone usage with simple text files.

If used as an Eventhandler the arguments are “RECEIVED” and the path to the SMS file, add “eventhandler=/path/to/” to your smsd.conf. Without SMS Server Tools you can also use a simple file for posting to twitter:
Create a file starting like this:

  1. Phone: 0634567890
  3. Your tweet in max. 140 characters

Then call this script with the path to your file:

  1. /path/to/file.txt

You will need to create a sqlite3 DB with this schema:

  1. sqlite3 sms2twitter.db \
  2.     "CREATE TABLE account (phone, username, password, PRIMARY KEY(phone))"

For every Phone that you allow to post Tweets thru SMS you need to run:

  1. sqlite3 sms2twitter.db \
  2.     "INSERT INTO account VALUES (‘phonenumber’, ‘username’, ‘password’)"

Lees meer…

Categorie├źn:Linux Tips & Trics Tags:, , ,