Turn: All integration and sharing to Sina Netease Weibo code

Source: Internet
Author: User
From: http://www.taoba123.com/show.asp? Id = 7392

Recently, domestic and foreign microblogs have become popular, and most people are writing Weibo together. However, as Weibo becomes popular, people gradually get used to sending messages about life, work, study, and entertainment to their microblogs, for this reason, I have sorted out mainstream Weibo shares.CodeFor your use.

 I. Sina Weibo sharing code:

1. Common Code for various websites, forums, and blogs:

 

share on Sina Weibo

 

This Code does not need to apply for appkey

2. Sina shares the Code:

 

share on Weibo

Note:
You need to apply for an appkey account at: open.t.sina.com.cn
Required parameter for real appkey {string}
Optional parameter of image Link (string), empty by default
The title (string) is optional. The default is the title of the current page.
Content Link (string) is an optional parameter, which defaults to the location of the current page.
Optional parameter for page encoding (string). [gb2312 | UTF-8] default value: gb2312
<A> you can modify the link style and text as needed. "% 20f" is a normal code in the Code, which does not need to be processed.

 3. Unofficial official code: 

 

 

1), <a href = "http://v.t.sina.com.cn/share/share.php? Title = % E4 % BD % A0 % E5 % a5 % BD % 20 Hello % 20 World "target =" _ blank "> share on Weibo </a>, simple sharing (no application required)

2), <a href = "http://v.t.sina.com.cn/share/share.php? Appkey = 4120396272 & Title = % E4 % BD % A0 % E5 % a5 % BD % 20 Hello % 20 World "target =" _ blank "> share on Weibo </a>, with appkey (appkey needs to go to open.t.sina.com.cn to apply)

The field must go through encodeuricomponent, for example:
Hello http://t.sina.com.cn/-& gt <SCRIPT> document. Write (encodeuricomponent ("Hello http://t.sina.com.cn/"); </SCRIPT>

 

Note: You need to apply for the appkey at open.t.sina.com.cn.

Ii. NetEase Weibo sharing code

1. Style 1: Any website or blog can be called.

 

<A href = "javascript :( function () {window. Open ('HTTP: // t.163.com/article/user/checklogin.do? Link = http://news.163.com/&source='potato net' + '& info =' + encodeuricomponent (document. title) + ''+ encodeuricomponent (location. href), '_ blank', 'width = 510, Height = 300 ');})() "Title =" share To Netease Weibo "> </a>

2. Style 2

 

 

<A target = "_ Self" onclick = "(function () {var url = 'link = http://news.163.com/&amp;source='+ encodeuricomponent ('netease News') + '& amp; info = '+ encodeuricomponent (document. title) + ''+ encodeuricomponent (document. location. href); window. open ('HTTP: // t.163.com/article/user/checklogin.do? '+ URL +' & amp; '+ new date (). gettime (), 'newwindow', 'height = 330, width = 550, Top = '+ (screen. height-280)/2 + ', Left =' + (screen. width-550)/2 + ', toolbar = No, menubar = No, scrollbars = No, resizable = Yes, location = No, status = no ');})() "href =" javascript: void (0 ); "> share on Netease Weibo </a>

 

The above code is simple and practical. It is a secret weapon for you to give your own blogs and websites a home, and I wish you a pleasant stay. = ^ _ ^ = (Text/monkey)

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.