Sina Weibo app development application example: Getting Weibo content records of a specified Weibo account

Source: Internet
Author: User

Introduction: This is a detailed page for Sina Weibo app development and application examples to obtain Weibo content records for a specified Weibo account. It introduces PHP-related knowledge, skills, and experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 339498 'scrolling = 'no'> recently, I am developing an app for Sina Weibo. In this example, I will obtain the Weibo content record of a specified Weibo account.

Hefei network product Center

Example of app development on Sina Weibo

<HTML>
<Head>
<Title> Sina Weibo app development application example: Getting Weibo content records of a specified Weibo account </title>
<SCRIPT type = "text/JavaScript" 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>
</Head>
<Body>
Weibo ID: <input type = "text" id = "ID"/> <br/>
Number of Weibo posts extracted (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: '20140901 ',
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 ()
// Appkey at source
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>
</Html>

ArticleSource: Hefei network product Center

This article: http://lab.wehefei.com/posts/285

For more information, visit.

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/339498.html pageno: 8.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.