Search code examples
androidoauthtumblr

Tumblr Android - Post Image using Oauth


I have an app that shares pictures via Facebook, Twitter and Tumblr. I was successfully able to share pictures through Facebook and Twitter. However, Tumblr simply refuses to oblige. Are there any libraries available for Tumblr? Currently, I have retrieved a user token and a secret via a callback through a webview. But, I am at sea at how to post an image to a blog on Tumblr. Any guidance would be very much appreciated.

I have looked into the Tumblr apis, but the documentation is rather vague. http://www.tumblr.com/docs/en/api/v2#blog_methods. The requests need a 'blog name', which I am not sure how to obtain.

To delve further, here is a sample post url, listed in the documentation - api.tumblr.com/v2/blog/{base-hostname}/post. Now, the problem here is that 'base-hostname' wouldn't be provided by the user when he/she is logging in. So, I am clueless at this point as how to acquire it.


Solution

  • Once authenticated and you have your Token and Secret Token call http://api.tumblr.com/v2/user/info this will return the users blog's and there URL's.