Skip to content

Instantly share code, notes, and snippets.

@maddievision
Created March 4, 2013 03:41
Show Gist options
  • Save maddievision/5079739 to your computer and use it in GitHub Desktop.
Save maddievision/5079739 to your computer and use it in GitHub Desktop.
Very simple wrapper for TweetBot URL scheme for Pythonista http://omz-software.com/pythonista
import urllib
import webbrowser
CALLBACK_URL_BASE = 'pythonista://'
url = "tweetbot://x-callback-url/post?"
def tweet(txt,cb=CALLBACK_URL_BASE):
data = {
'text': txt,
'callback_url': cb
}
surl = url + urllib.urlencode(data)
webbrowser.open(surl)
print "Tweet Complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment