js weibo api
生活随笔
收集整理的這篇文章主要介紹了
js weibo api
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
為什么80%的碼農都做不了架構師?>>>
<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>
轉載于:https://my.oschina.net/xmanjn/blog/169326
總結
以上是生活随笔為你收集整理的js weibo api的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 51博客
- 下一篇: some language gramma