js weibo api

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Weibo</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
 <script type="text/javascript">


function getinfo(id){


    $.ajax({


        url: "https://api.weibo.com/2/users/show.json",
        type: "GET",
        dataType: "jsonp",
        data: {
            access_token:"xxxxxxxxxxxxxx",
            uid: id,
        },
        success: function(data) {
        $("body").append("<br/> 名字:" +data.data.screen_name+  "<br/>");
        $("body").append("<br/> 位置:" +data.data.location+  "<hr>");
 
        }
    })


}


getinfo(2039061031);
getinfo(2884007980);


 </script>
</head>
<body>
    <div id="jsWeibo"></div>
</body>
</html>

你可能感兴趣的:(js weibo api)