Search code examples
objective-cios7tumblr

How to grab a user's Avatar from Tumblr


I am working on Login with Tumblr in my application.

Everything is working fine, I am able to get blog name, access key and access secret key. But not able to get the avatar of the profile.

I am using GTMOAuth.

Please suggest me how I can get the profile pic.


Solution

  • As per the documentation, the correct way to get a profile is avatar is to invoke

    /avatar
    

    In particular, you can get a blog's avatar in 9 different sizes. The default size is 64x64.

    /avatar/512
    

    would grab the URL of an avatar of 512x512

    Reference: http://www.tumblr.com/docs/en/api/v2#blog-avatar.

    You can use the URL to download/display the specific image.

    But do you need something in particular?

    Note There is also an SDK for Objective-C available on GitHub TMTumblrSDK.