January 07, 2010

Cron based script to change twitter profile image

I have been trying to write a simple python script using python-twitter which is triggered by cron and is run, say every 4 hours to change the twitter profile image. I could do something like have 6 profile images per day, each somehow representing the time of the day (or something similar).
Now I have been at the python-twitter API documentation for some time, looks like I can set the profile image url to something I want using the User class and the function SetProfileImageUrl(self,image_url), but the problem is that , the function manipulates the local values of the object (of type User) and the changes are not reflected on the twitter site. The same happens when I manipulate the status of the User object.
Is there some way to update the changes to the User object to the twitter site, or am I taking the wrong approach, or does python-twitter have support for changing the profile image at all ?

No comments:

Post a Comment