views:

286

answers:

1

Hi,

i'm writing a small script to tweet messages from the monitoring systems. The only issue i ran into so far is that i can't set the User-Agent correctly, all tweets show up as "from API" which ain't a huge deal but i wonder what I'm doing wrong. An example to reproduce this behavior:

import sys
import twitter

USERNAME="twitteruser"
PASSWORD="twitterpassword"

api = twitter.Api(username=USERNAME, password=PASSWORD)
api.SetUserAgent("Monitor")
api.SetXTwitterHeaders("Monitor", None, "0.1")
status = api.PostUpdate("Test")

I'm running Python 2.6.4 on Ubuntu 9.10 with python-twitter 0.6

Any ideas ? :-)

+1  A: 

In order to get Twitter to recognize your application you have to use OAuth nowadays and register your application.

See this FAQ entry and Twitter's application registration form.

af