def twitter_post(username,password,message):
import urllib, urlib2, base64, gluon.contrib.simplejson
args= urllib.urlencode([('status',message)])
headers={}
headers['Authorization'] = 'Basic '+base64.b64encode(username
+':'+password)
request = urllib2.Request('http://twitter.com/statuses/
update.json', args, headers)
return gluon.contrib.simplejson.loads(urllib2.urlopen(req).read
())
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---