How to extract data from Tumblr API (JSON)?

前端 未结 3 898
刺人心
刺人心 2020-12-14 23:15

I have set up a Tumblr account and registered my application to authenticate it.

Tumblr Documentation: http://www.tumblr.com/docs/en/api/v2

I understand the

3条回答
  •  离开以前
    2020-12-15 00:04

    One way to write an object to the screen is to add an element containing its JSON representation to the page:

    $.ajax({
        url: "http://api.tumblr.com/v2/blog/myblog.tumblr.com/info?api-key=myapikey",
        dataType: 'jsonp',
        success: function(results){
            $("body").append(
                $("
    ").text(JSON.stringify(results, null, "    "))
            );
        }
    });
    

    Here is a demonstration: http://jsfiddle.net/MZR2Z/1/

提交回复
热议问题