Skip to content

Instantly share code, notes, and snippets.

@hypnoJerk
Created April 7, 2016 08:59
Show Gist options
  • Save hypnoJerk/864ae008ebbb7585f4a29f247b292c40 to your computer and use it in GitHub Desktop.
Save hypnoJerk/864ae008ebbb7585f4a29f247b292c40 to your computer and use it in GitHub Desktop.
Test your Twitter OAuth keys with this simple Python script
#!/usr/bin/env python
import sys, time
from twython import Twython
CONSUMER_KEY = 'xxxxx'
CONSUMER_SECRET = 'xxxxx'
ACCESS_KEY = 'xxxx-xxxx'
ACCESS_SECRET = 'xxxx'
print('Starting')
api = Twython(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_KEY,ACCESS_SECRET)
print('Authenticated')
api.update_status(status=sys.argv[1])
print('Success!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment