Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 17th, 2012  |  syntax: None  |  size: 0.54 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. updating twitter status from an application using oauth and twython
  2. import twitter
  3. oauth = twitter.OAuth(OAUTH_TOKEN, OAUTH_SECRET, TWITTER_TOKEN, TWITTER_SECRET)
  4. t = twitter.Twitter(auth=oauth)
  5. t.statuses.update(status="I've updated my account status")
  6.        
  7. from twython import Twython
  8. twitter = Twython(twitter_token = TWITTER_TOKEN,
  9.                       twitter_secret = TWITTER_SECRET,
  10.                       oauth_token = OAUTH_TOKEN,
  11.                       oauth_token_secret = OAUTH_SECRET)
  12. print twitter.updateStatus(status="I'm not working")