What I have
I have an image File object
trying to post to Tumblr
using Jumblr API
My problem
When I try to post the image I get com.tumblr.jumblr.exceptions.JumblrException: Bad Request Response code :400
My code
client = new JumblrClient(CONSUMER_KEY,SECRET_KEY);
client.setToken(TOKEN, TOKEN_SECRET);
User user=client.user();
userName=user.getName();
PhotoPost photoPost=client.newPost(client.user().getBlogs().get(0).getName(),PhotoPost.class);
photoPost.setCaption("My Tumblr post");
photoPost.setPhoto(new Photo(Methods.FILE_IMAGE));
photoPost.save();
I had a similar problem posting a video & audio. However, posting an Image worked like a charm..
I've encountered the same issue using Jumblr.
Instead of this method (does it somehow trigger Android gallery? Couldn't find any javadoc for Methods.FILE_IMAGE)
I suggest you to try any flavor of
And please try it with different files: Tumblr has not only file-size limitations, but also some weird check for file being valid. ~3% of gif files I upload throw Bad Request Response code :400. Those files are not exceeding GIF size limit and they're displayed fine on my machine, but Tumblr, for some reason rejects them, so please try post.setData and try it with some bulletproof-valid file, because from the rest of your code - it definitely looks like you're doing it right