Skip to content

Instantly share code, notes, and snippets.

@derekg
Created May 30, 2011 18:14
Show Gist options
  • Save derekg/999242 to your computer and use it in GitHub Desktop.
Save derekg/999242 to your computer and use it in GitHub Desktop.
Simple Tumblr Posting Example
import urllib,sys
params = { 'email': 'derek@codecubed.com' , 'password' : 'SECRET PASSWORD'}
params['type'] = 'regular'
params['group'] = 'http://derek-test-06.tumblr.com'
params['title'] = 'I love tumblr'
params['body'] = 'and I love python'
cred = urllib.urlencode(params,True)
print urllib.urlopen('http://www.tumblr.com/api/write',cred).read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment