Now the popular thing microblogging is the Internet play more fire things, today we have to use Sina app to achieve the designated micro-blog account of the microblogging content recording method. Hope to help you.
<title> Sina Weibo app development application sample capture Weibo content records for designated Weibo accounts </title>
<script type= "text/web Effects" src= "Http://js.wcdn.cn/t3/platform/js/api/wb.js" charset= "Utf-8" ></script>
<script type= "Text/javascript" src= "Http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" ></ Script>
<body>
Weibo id:<input type= "text" id= "id"/><br/>
Number of tweets (up to 20): <input type= "text" id= "num"/><br/>
<input type= "button" onclick= "Testt ($ (' #id '). Val (), $ (' #num '). Val ());" Value= button "/>
</body>
<script type= "Text/javascript" >
WB.core.load ([' Connect ', ' client '], function () {
var cfg = {
Key: ' 3274830762 ',
Xdpath: ' sina.html '
};
WB.connect.init (CFG);
WB.client.init (CFG);
});
function Testt (id,num) {
$.ajax ({
URL: "Http://api.t.sina.com.cn/statuses/user_timeline.json",
Data: "source=941123049&user_id=" + ID,///"Method=read",//$ ("#textBox1"). Children (). Serialize ()
Source is Appkey.
DataType: "Jason",
Type: "POST",
Success:function (data) {
alert (data.length);
var t = eval (' (' +data+ ') ');
alert (data);
alert (t.length);
if (num>20)
{
num=20;
}
for (i=0;i<num; i++)
{
$ ("Body"). Append ("<br/>" + "[" + i + "]" + T[i].text + "<br/>");
}
}
} );
}
</script>