Question

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 ? :-)

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top