Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renren, Weibo, and Baidu Like buttons using only HTML (No Javascript)

I am working on a website that will marketed in China, and I would like to know if there is a method to create "share" buttons for Renren (Similar to Facebook), Weibo (Similar to Twitter) and Baidu Like (Similar to Google's +1) using only HTML.

For example, for Facebook, Twitter and Google's +1 you would use the following:

  • http://twitter.com/share?url=http://example.com&text=Description
  • http://www.facebook.com/sharer.php?u=http://example.com
  • https://plusone.google.com/_/+1/confirm?hl=en&url=http://example.com

I know that Renren uses the following:

  • http://share.renren.com/share/buttonshare.do?link=http://example.com&title=Description

However, I would love to know what the HTML only URLs for Weibo and Baidu Like are.

Here is the documentation for the Javascript version of the share buttons if that helps:

  • http://wiki.dev.renren.com/wiki/Xn:share-button
  • http://open.weibo.com/sharebutton
  • http://share.baidu.com/like/get-codes
like image 695
Andrew Odri Avatar asked May 07 '12 23:05

Andrew Odri


2 Answers

Hopefully this can help someone in the future; here is how to implement HTML only share/like buttons for Renren, Weibo, and Baidu Like/Space/Forums/Bookmarks:

Renren

As mentioned above, use the following URL format to share a link on Renren:

  • http://share.renren.com/share/buttonshare.do?link=http://example.com&title=Description

Weibo

The following URL format will allow you post to your Weibo account, in the same manner as you would for Twitter:

  • http://service.weibo.com/share/share.php?url=http://example.com&appkey=&title=Description&pic=&ralateUid=&language=zh_cn

Baidu

Baidu has multiple services that can be posted to; the one relevant to this post is Baidu Like, but I have provided URLs for Baidu Space, Forums, and Bookmarks for reference as well:

To like a link in in the same manner as Facebook/Google +1, using the following URL structure:

  • http://like.baidu.com/set?buttontype=small&cb=bdShare.ajax._callbacks.bd4bb141b&index=0&url=http://example.com

I tracked the above URLs down using a packet analyser, and as far as I can tell, Baidu Like has to be called from the referring page, or at the very least, the referring domain. The callback function bd4bb141b does not seem to be specific to any domain or user ID.


Please note that I have not tested the following URLs structures thoroughly:

  • To share a link on Baidu Space, use the following URL structure: http://apps.hi.baidu.com/share/?url=http://example.com&title=Description
  • To share a link on Baidu Tieba (Forums), use the following URL structure: http://tieba.baidu.com/i/app/open_share_api?link=http://example.com
  • To save a link to Baidu Cang (Bookmarks), use the following URL structure: http://cang.baidu.com/do/add?it=Description&iu=http://example.com

Also for reference, a good Chinese alternative to FeedBurner is FeedSky.

like image 131
Andrew Odri Avatar answered Oct 16 '22 15:10

Andrew Odri


With my own site (currently) the share button does not show up when using httpS ... but it does with http

Here is the link to the most recent (November 10th, 2015) Weibo share button code generator (scroll to the bottom to get the code):

http://open.weibo.com/sharebutton

like image 4
WebDev-SysAdmin Avatar answered Oct 16 '22 14:10

WebDev-SysAdmin