Created
March 4, 2013 03:41
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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