see ammendments and it worked thanks
urllib2 and request

On Nov 28, 10:47 pm, murray3 <ch...@murraypost.net> wrote:
> def twitter_post(username,password,message):
>     import urllib, urllib2, 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(request).read
> ())
>
> Massimo could you offer some example view code to use this function,
> regards
> chrism

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to