tumblr / docs

Tumblr's public platform documentation.
Apache License 2.0
108 stars 26 forks source link

V2 API: Blog info call does not return user following information correctly #116

Open johntringham opened 1 year ago

johntringham commented 1 year ago

Attempting to find out if the authenticated user follows a specific blog does not work correctly through the blog info call.

The documentation says that to find this out, you should use the blog /info call with the followed or duration_following_blog optional parameters. eg. https://api.tumblr.com/v2/blog/staff/info?api_key=redacted&fields[blogs]=name,?followed,?duration_following_blog

Expected response (as the account I am using does follow staff and has done for multiple years) is json with followed:true and some positive integer for duration_following_blog.

Actual response: {"meta":{"status":200,"msg":"OK"},"response":{"blog":{"name":"staff","duration_following_blog":-1}}} Duration following blog is -1 (which represents "not following"), and followed does not appear at all in the response at all.

Also note that duration_blog_following_you also always returns -1 when trying to query this API call no matter the blog. This seems to be the case for all blogs I have tried, not just staff.

There are no documented alternate acceptable methods for finding out if a user follows a specific user, short of repeatedly calling /following and combing through that list, which is not workable as that has a maximum of 20 results at a time.

sanmai commented 1 year ago

It has be an authenticated request for duration_following_blog to work: i.e. we have to know which user is asking for the duration. So using your OAuth Consumer Key won't get you the duration.

I agree our documentation isn't clear about that, so I'll leave this issue open.