Weibo Links

Weibo Links is an open protocol that can quickly connect your APP or Mobile Web with Weibo. Its development is simple and can be quickly launched. At the same time, users can easily return to your APP or Mobile Web after connecting to Weibo.


Let's experience these features together. Scan the QR code below to enter the test experience page.



developer's guide

If you don't have an AppKey, please create your app on the open platform website first, Application entry


Mobile APP access

In your Mobile App, you can directly connect to Weibo through Links URL.


Connect to the microblog personal homepage of the designated user, and you can add attention and other interactions after the connection
Links URL
 sinaweibo://userinfo?luicode=10000360&lfid=OP_ Your APPKEY&uid=Weibo user UID&launchid=10000360-OP_your APPKEY
Example
Links URL
 sinaweibo://userinfo?luicode=10000360&lfid=OP_1116166085&uid=1404376560&launchid=10000360 -OP_1116166085


Connect to the specified detail page of a single microblog. After connecting, you can transfer, comment, like and other interactions on this microblog
Links URL
 sinaweibo://detail?luicode=10000360&lfid=OP_ Your APPKEY&mblogid=Single Weibo MID&launchid=10000360-OP_Your APPKEY
Example
Links URL
 sinaweibo://detail?luicode=10000360&lfid=OP_1116166085&mblogid=4011688199554080&launchid=10000360 -OP_1116166085


Connect to the specified Weibo headline page
Links URL
 sinaweibo://article?luicode=10000360&lfid=OP_ Your APPKEY&object_id=1022: Article object ID&launchid=10000360-OP_your APPKEY
Example
Links URL
 sinaweibo://article?luicode=10000360&lfid=OP_1116166085&object_id=1022:2309404011688201458259&launchid=10000360 -OP_1116166085


Share to Weibo
Links URL
 sinaweibo://sendweibo?luicode=10000360&lfid=OP_ Your APPKEY&content=Weibo content&launchid=10000360-OP_your APPKEY
Example
Links URL
 sinaweibo://sendweibo?luicode=10000360&lfid=OP_1116166085&content= I am a microblog to share&launchid=10000360-OP_1116166085


Comment on the specified microblog
Links URL
 sinaweibo://comment?luicode=10000360&lfid=OP_ Your APPKEY&srcid=comment's microblog ID&launchid=10000360-OP_your APPKEY
Example
Links URL
 sinaweibo://comment?luicode=10000360&lfid=OP_1116166085&srcid=4011688199554080&launchid=10000360 -OP_1116166085


Connect to microblog search content stream
Links URL
 sinaweibo://searchall?luicode=10000360&lfid=OP_ Your APPKEY&q=search keyword&launchid=10000360-OP_your APPKEY
Example
Links URL
 sinaweibo://searchall?luicode=10000360&lfid=OP_1116166085&q= Weibo open platform&launchid=10000360-OP_1116166085


Connect to my Weibo message stream
Links URL
 sinaweibo://gotohome?luicode=10000360&lfid=OP_ Your APPKEY&launchid=10000360-OP_your APPKEY
Example
Links URL
 sinaweibo://gotohome?luicode=10000360&lfid=OP_1116166085&launchid=10000360 -OP_1116166085


Connect to my Weibo homepage
Links URL
 sinaweibo://myprofile?luicode=10000360&lfid=OP_ Your APPKEY&launchid=10000360-OP_your APPKEY
Example
Links URL
 sinaweibo://myprofile?luicode=10000360&lfid=OP_1116166085&launchid=10000360 -OP_1116166085


Mobile Web Access

Follow the steps below to learn how to add the function of connecting to Weibo in your Mobile Web.


1. Import WBLink JS files on your Mobile Web

Deploy wblink.js on your H5 page. At the same time, if your page code is not UTF-8, please add charset="utf-8" attribute. The imported JS file parameter ak is set to your AppKey.

HTML
 <script src=" http://open.weibo.com/wblinks.js?ak=YOUR  APPKEY" type="text/javascript" charset="utf-8"></script>


2. Start connecting to Weibo

Connect your H5 page to the Weibo, add the<a>tag, and point the link to the WBLink method.


3. WBLink disclosure method and description
WBLink exposes methods.
WBLink.userinfo(uid)
Connect to the microblog homepage of the designated user, and then you can add attention and other interactions.
Example
HTML
 <a href="javascript: WBLink. userinfo ('1404376560 ');">Weibo</a>
Parameter Description
Parameter name type Default Required Description
uid string nothing yes The UID of the microblog user to be connected.


WBLink.detail(mid, uid)
Connect to the specified detail page of a single microblog. After connecting, you can transfer, comment, like and other interactions on this microblog.
Example
HTML
 <a href="javascript: WBLink. detail ('4011688199554080 ','1404376560');">View Weibo</a>
Parameter name type Default Required Description
mid string nothing yes ID of the single microblog to be connected.
uid string nothing yes User UID of the author of Weibo.


WBLink.article(aid)
Connect to the specified Weibo headline page.
Example
HTML
 <a href="javascript: WBLink. article ('2309404011688201458259 ');">View the original article</a>
Parameter name type Default Required Description
aid string nothing yes The ID of the microblog headline that needs to be connected.


WBLink.sendweibo(text)
Share to Weibo.
Example
HTML
 <a href="javascript: WBLink. sendweibo ('I'm a Weibo to share ');">Share to Weibo</a>
Parameter name type Default Required Description
text string nothing yes The content shared to Weibo cannot exceed 140 words.


WBLink.comment(mid)
Comment on the specified microblog.
Example
HTML
 <a href="javascript: WBLink. comment ('4011688199554080 ');">comment</a>
Parameter name type Default Required Description
mid string nothing yes The ID of the microblog you want to comment on.


WBLink.search(keyword)
Connect to the microblog search content stream.
Example
HTML
 <a href="javascript: WBLink. search ('Weibo Open Platform ');">Hot search words</a>
Parameter name type Default Required Description
keyword string nothing yes Search keywords, popular microblog search words.


WBLink.home()
Connect to my Weibo message stream.
Example
HTML
 <a href="javascript: WBLink. home();">Brush my Weibo</a>


WBLink.myprofile()
Connect to my Weibo homepage.
Example
HTML
 <a href="javascript: WBLink. myprofile();">My Weibo Home Page</a>



Document update time: March 17, 2020