Reputation: 2805
I've managed to post to tumblr via their OAuth API.
Unfortunately I cannot read posts because the endpoint for reading is http://you.tumblr.com/api/read (with "you" being the user's username), and I cannot find any method for getting the username.
Making a call to http://www.tumblr.com/api/authenticate is supposed to return user info, and the call is successful, but response['body'] is empty.. Any ideas?
Upvotes: 1
Views: 5479
Reputation: 36280
I was successful at getting results from http://www.tumblr.com/api/authenticate It returns xml (no json option exists) and that xml includes something like this:
<?xml version="1.0" encoding="UTF-8"?>
<tumblr version="1.0">
<user default-post-format="html" can-upload-audio="1" can-upload-aiff="1" can-ask-question="1" can-upload-video="1" max-video-bytes-uploaded="26214400" liked-post-count="0"/>
<tumblelog title="Snytkine" is-admin="1" posts="1" twitter-enabled="0" draft-count="0" messages-count="0" queue-count="" name="snytkine" url="http://snytkine.tumblr.com/" type="public" followers="0" avatar-url="http://assets.tumblr.com/images/default_avatar_128.gif" is-primary="yes" backup-post-limit="30000"/>
</tumblr>
I have not moved any futher at my Tumblr API script, but from what I see, there is no such thing as tumblr username or userid or user avatar. It's all about blogs. User can have more than one blog and each blog can have own avatar. So maybe substritue "name" for a blog name?
Upvotes: 0