Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5992373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:31:20+00:00 2026-05-22T23:31:20+00:00

Everyone knows? about avatar url in tumblr api / read / json? like for

  • 0

Everyone knows? about avatar url in tumblr api / read / json?
like for example the facebook?

http://graph.facebook.com/%5Byour facebook id]/picture?type=normal

<?php
$tumblog = 'natadec0c0'; // change to your username
// if your Tumblog is self hosted, you need to change the base url to the location of your tumblog
$baseurl = 'http://' . $tumblog . '.tumblr.com';
$request = $baseurl . '/api/read/json';
$ci = curl_init($request);
curl_setopt($ci,CURLOPT_RETURNTRANSFER, TRUE);
$input = curl_exec($ci);
curl_close($ci);

// Tumblr JSON doesn't come in standard form, some str replace needed

$input = str_replace('var tumblr_api_read = ','',$input);
$input = str_replace(';','',$input);

// parameter 'true' is necessary for output as PHP array

$value = json_decode($input,true);
$content =  $value['posts'];
$blogInfo = $value['tumblelog'];

// the number of items you want to display
$item = 10;

// Echo the blog info
echo "<h3><a href=\"" . $baseurl . "\">" . $blogInfo['title'] . "</a></h3>\n";
echo "<h4>" . $blogInfo['picture'] . "</h4>\n<hr />\n";

?>

how to append my current avatar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:31:21+00:00Added an answer on May 22, 2026 at 11:31 pm

    I guess you have to use

    GET http://www.tumblr.com/api/authenticate?email=user@example.com&password=12345
    

    to get the avatar of the user. The sample response for mine is

    <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="134"/>
    <tumblelog title="ABNKKPGPiCTuReNPLaKo?!" is-admin="1" posts="301" twitter-enabled="0" draft-count="0" messages-count="0" queue-count="" name="arvn" url="http://arvn.tumblr.com/" type="public" followers="17" avatar-url="http://28.media.tumblr.com/avatar_b1786ec9e62d_128.png" is-primary="yes" backup-post-limit="30000"/>
    <tumblelog title="i kras yu." is-admin="1" posts="1" twitter-enabled="0" draft-count="0" messages-count="0" queue-count="" name="ikrasyu" url="http://ikrasyu.tumblr.com/" type="public" followers="2" avatar-url="http://25.media.tumblr.com/avatar_02a7ef66fce8_128.png" backup-post-limit="30000"/>
    </tumblr>
    

    and get the avatar-url field of the corresponding tumblelog. Too bad there is no json format option, maybe use preg_match. You also need the email address and password of the user, or do it via OAuth.

    Or you could scrape the tumblelog for the avatar.

    $page = file_get_contents("http://{$tumblog}.tumblr.com/");
    $avatar = preg_match('/<img src="(http.+)" alt="portrait"/', $page, $matches) ? $matches[1]: 'http://example.com/blank.png';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

while designing my api, i am thinking about how i would like to model
I have a problem about the font in iphone/ipad Everyone knows UILabel can't do
Everyone knows the = sign. SELECT * FROM mytable WHERE column1 = column2; However,
as everyone knows Windows does paths with backslashes where Unix does paths with forward
Hello everyone I'm trying to work with jboss messaging, does anyone knows the default
I've been working on my own django based blog (like everyone, I know) to
Either this this question isn't asked often (possible), everyone knows how to do it
I have an inheritance hierarchy with overlap. The system knows about People that can
My friend (who knows nothing about programming what-so-ever) asked me if I could develop
Everyone knows and love String.IsNullOrEmpty(yourString) method. I was wondering if it's going to confuse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.