关联:

widget 工具 widget tools (add this , share this, jia this)

1.  Facebook

Text link:

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" οnclick="return fbs_click()" target="_blank">Share on Facebook</a>

Small icon and text:

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:16px; background:url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top left; }</style><a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" οnclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>

Icon only:

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_button { display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; height:15px; border:1px solid #d8dfea; background:url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top right; } html .fb_share_button:hover { color:#fff; border-color:#295582; background:#3b5998 url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top right; text-decoration:none; } </style> <a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" class="fb_share_button" οnclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a> 

custom:

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" layout="button_count" show_faces="true" width="450" action="recommend" font=""></fb:like>

Options:

layout: "standard",   "button_count"  和   "box_count";

show_faces: 'true' 和 'false'

action: 'like' 和 'Recommend'

Sources:

http://www.facebook.com/share_partners.php

http://developers.facebook.com/docs/guides/web/


custom your facebook button

http://www.buttonshut.com/facebook-badge.html

登录并获取首页:

<?php
echo 'loading <br/>';$login_email = 'my@sexy.mail';$login_pass = 'my_sexy_password';$fp = fopen("fb_cookies.txt", w);
fclose($fp); echo 'still loading <br/>';if (fb_login($login_email,$login_pass)){
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, 'https://login.facebook.com/login.php?login_attempt=1');curl_setopt($ch, CURLOPT_POSTFIELDS,'charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&locale=en_US&email='.urlencode($login_email).'&pass='.urlencode($login_pass).'&pass_placeholder=&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84');curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_HEADER, 0);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch, CURLOPT_COOKIEJAR, str_replace('\\','/',dirname(__FILE__)).'/fb_cookies.txt');curl_setopt($ch, CURLOPT_COOKIEFILE, str_replace('\\','/',dirname(__FILE__)).'/fb_cookies.txt');curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)");
$html = curl_exec($ch);curl_close($ch);echo $html;
}function fb_login($login_email, $login_pass){$ch = curl_init();curl_setopt($ch, CURLOPT_URL, 'https://login.facebook.com/login.php?login_attempt=1');curl_setopt($ch, CURLOPT_POSTFIELDS,'charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&locale=en_US&email='.urlencode($login_email).'&pass='.urlencode($login_pass).'&pass_placeholder=&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84');curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_HEADER, 0);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch, CURLOPT_COOKIEJAR, str_replace('\\','/',dirname(__FILE__)).'/fb_cookies.txt');curl_setopt($ch, CURLOPT_COOKIEFILE, str_replace('\\','/',dirname(__FILE__)).'/fb_cookies.txt');curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)");
$html = curl_exec($ch);$err = 0;$err = curl_errno($ch); curl_close($ch);if ($err != 0){echo 'error='.$err."\n";return(false);} else {echo 'fetching..';return(true);}}
?>

2.  Twitter

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="IBTimes" data-related="IBTimes">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Sources:

http://tweetmeme.com/about/retweet_button

http://twitter.com/about/resources/tweetbutton

http://www.twitterbuttons.com/

3.  Stumbleupon

<script src="http://www.stumbleupon.com/hostedbadge.php?s=1"></script>

Sources:

http://www.stumbleupon.com/badges/

4.  Google +1

<html><head><title>+1 demo: Basic page</title><script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script></head><body><g:plusone></g:plusone></body>
</html>

更多查看:

http://www.google.com/webmasters/+1/button/

http://code.google.com/apis/+1button/#jsapi

5.  Linkedin

<html><head><title>Basic page</title></script></head><body><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="www.ibtimes.com" data-counter="right"></script></body>
</html>

更多查看:

http://developer.linkedin.com/docs/DOC-1283

http://developer.linkedin.com/index.jspa

6.  Disqus

<div id="disqus_thread"></div>
<script type="text/javascript">/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */var disqus_shortname = 'example'; // required: replace example with your forum shortname (you need to register for free)// The following are highly recommended additional parameters. Remove the slashes in front to use.// var disqus_developer = 1;// var disqus_identifier = 'unique_dynamic_id_1234';// var disqus_url = 'http://example.com/permalink-to-page.html';// var disqus_config = function () { this.language = "it"; }; // this will set language to italy for the request, and default is en/* * * DON'T EDIT BELOW THIS LINE * * */(function() {var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>

disqus_shortname   tells Disqus which website account (called a  forum   on Disqus) this system belongs to.

disqus_identifier   tells Disqus how to uniquely identify the current page.

disqus_url   tells Disqus the location of the page for permalinking purposes.

如何出现类似 “We were unable to load Disqus. For more information please see our documentation on identifier and urls.” 的提示错误,可以在JavaScript中加入: var disqus_developer = 1;

更多查看:

http://disqus.com/features/

http://docs.disqus.com/developers/universal/

7.  gigya

<html>
<head><SCRIPT type="text/javascript" lang="javascript" src="http://cdn.gigya.com/JS/socialize.js?apikey=2_Y82PzwJ_chSFImHXaIDJClnLyJzmk-VFOavSsaNTzl6m901s_NNxRAS0xJ3bd3_N"></SCRIPT><script>var conf = {APIKey: '2_Y82PzwJ_chSFImHXaIDJClnLyJzmk-VFOavSsaNTzl6m901s_NNxRAS0xJ3bd3_N'};// This method is activated when page is loadedfunction onLoad() {// register for login eventgigya.services.socialize.addEventHandlers(conf, {context: { str: 'congrats on your' }, onLogin: onLoginHandler , onLogout: onLogoutHandler});}// onLogin Event handlerfunction onLoginHandler(eventObj) {   alert(eventObj.context.str + ' ' + eventObj.eventName + ' to ' + eventObj.provider + '!\n' + eventObj.provider + ' user ID: ' +  eventObj.user.identities[eventObj.provider].providerUID);// verify the signature ...verifyTheSignature(eventObj.UID, eventObj.timestamp, eventObj.signature);// Check whether the user is new by searching if eventObj.UID exists in your databasevar newUser = true; // lets assume the user is newif (newUser) {// 1. Register user // 2. Store new user in DB// 3. link site account to social network identity//   3.1 first construct the linkAccounts parametersvar dateStr = Math.round(new Date().getTime()/1000.0); // Current time in Unix format//(i.e. the number of seconds since Jan. 1st 1970)var siteUID = 'uTtCGqDTEtcZMGL08w'; // siteUID should be taken from the new user record// you have stored in your DB in the previous stepvar yourSig = createSignature(siteUID, dateStr);var params = {siteUID: siteUID, timestamp:dateStr,cid:'',signature:yourSig};//   3.1 call linkAccounts method:gigya.services.socialize.notifyRegistration(conf, params);}document.getElementById('status').style.color = "green";document.getElementById('status').innerHTML = "Status: You are now signed in";}// Note: the actual signature calculation implementation should be on server sidefunction createSignature(UID, timestamp) {encodedUID = encodeURIComponent(UID); // encode the UID parameter before sending it to the server.// On server side use decodeURIComponent() function to decode an encoded UIDreturn '';}// Note: the actual signature calculation implementation should be on server sidefunction verifyTheSignature(UID, timestamp, signature) {encodedUID = encodeURIComponent(UID); // encode the UID parameter before sending it to the server.// On server side use decodeURIComponent() function to decode an encoded UIDalert('Your UID: ' + UID + '\n timestamp: ' + timestamp + '\n signature: ' + signature + '\n Your UID encoded: ' + encodedUID);}// Logout from Gigya platform. This method is activated when "Logout" button is clicked function logoutFromGS() {gigya.services.socialize.logout(conf, {/*no required params*/}); // logout from Gigya platform}// onLogout Event handlerfunction onLogoutHandler(eventObj) {document.getElementById('status').style.color = "red";document.getElementById('status').innerHTML = "Status: You are now signed out";}</script>
</head>
<body οnlοad="onLoad()"><br /><h4>Please sign in using one of the following providers:</h4><br /><br /><div id="loginDiv"></div><script type="text/javascript">gigya.services.socialize.showLoginUI(conf, { height: 85,width: 360,showTermsLink:false // remove 'Terms' link,hideGigyaLink:true // remove 'Gigya' link,buttonsStyle: 'fullLogo' // Change the default buttons design to "Full Logos" design,showWhatsThis: true // Pop-up a hint describing the Login Plugin, when the user rolls over the Gigya link.,containerID: 'loginDiv' // The component will embed itself inside the loginDiv Div ,cid:''});</script><br /><br /><br /><br /><h4>Click the button below to sign out from Gigya platform:</h4><br /><br /><input id="btnLogout" type="button" value="Sign Out" οnclick="logoutFromGS()"/><br /><br /><div id="status"></div></body>
</html>

更多查看:

http://www.gigya.com/

http://developers.gigya.com/040_Demos/038_Comments_Plugin

8.  QQ

分享到QQ空间

<script type="text/javascript">
(function(){
var p = {
url:location.href,
desc:'',/*默认分享理由(可选)*/
summary:'',/*摘要(可选)*/
title:'',/*分享标题(可选)*/
site:'',/*分享来源 如:腾讯网(可选)*/
pics:'' /*分享图片的路径(可选)*/
};
var s = [];
for(var i in p){
s.push(i + '=' + encodeURIComponent(p[i]||''));
}
document.write(['<a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?',s.join('&'),'" target="_blank" title="分享到QQ空间"><img src="http://qzonestyle.gtimg.cn/ac/qzone_v5/app/app_share/share_s.png" alt="分享到QQ空间" /></a>'].join(''));
})();
</script>

分享到腾讯朋友

<script type="text/javascript">
(function(){
var p = {
url:location.href,
to:'pengyou',
desc:'',/*默认分享理由(可选)*/
summary:'',/*摘要(可选)*/
title:'',/*分享标题(可选)*/
site:'',/*分享来源 如:腾讯网(可选)*/
pics:'' /*分享图片的路径(可选)*/
};
var s = [];
for(var i in p){
s.push(i + '=' + encodeURIComponent(p[i]||''));
}
document.write(['<a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?',s.join('&'),'" target="_blank" title="分享到腾讯朋友"><img src="http://qzonestyle.gtimg.cn/ac/qzone_v5/app/qzshare/to-py.png" alt="分享到腾讯朋友" /></a>'].join(''));
})();
</script>

分享:http://opensns.qq.com/share/

QQ登录:http://connect.opensns.qq.com/

QQ开发平台:http://opensns.qq.com/

QQ like:http://like.opensns.qq.com/

9. Reddit

<script type="text/javascript" src="http://www.reddit.com/static/button/button2.js?url=<?=url?>"></script>

http://www.reddit.com/buttons/

本站关联:

widget 工具 widget tools (add this , share this, jia this)

facebook, twitter,QQ, google +1, linkedin, disqus,gigya 按钮Network (登录)相关推荐

  1. foursquare_如何通过短信使用Facebook,Twitter,Google +和Foursquare

    foursquare Staying social while your mobile doesn't mean you have to pay for a data plan. Using SMS, ...

  2. instagram akp_如何备份您的社交媒体帐户-Facebook,Twitter,Google +和Instagram

    instagram akp How much of your life is recorded online? Spend a moment considering this and it's lik ...

  3. Web 网站页面的社交分享 (Linkedin, Facebook, Twitter)

    公司的web项目中,经常会有社交分享,这里简单说明下,方便后面开发人员理解. 分享的原理 社交分享(linkedin, facebook, twitter)的本质就是请求其一个公开的页面.通过参数告诉 ...

  4. 巴黎事件发生后,Facebook、Twitter、Google和Uber都做了什么?

    巴黎事件发生后,Facebook.Twitter.Google和Uber都做了什么? 今早醒来惊闻巴黎事件,震惊之余更是心痛.愿逝者安息,不要再有更多伤亡.那么面对这样突如其来的紧急事件,向来擅长应变 ...

  5. IOS-海外版授权分享推送统计 Google FaceBook Twitter Instagram

    目录 备注 Google Google分享 Google推送 FaceBook FaceBook分享 Twitter Twitter分享 Instagram Instagram分享 SDK下载 UIW ...

  6. 社交网站facebook_如何退出Facebook,Twitter,Google +和其他社交网络

    社交网站facebook There can be few computer users who do not have at least one social networking account ...

  7. 腾讯为Facebook发布QQ Chat

    腾讯为了拓展海外市场,已经为Facebook推出了一个QQ聊天工具QQ Chat.这款聊天工具不仅可为陌生Q友送花,发140字实时信息流"微博".而根据QQ Chat的官方页面显示 ...

  8. Facebook广告与Google广告有什么不同?

    这期我给大家介绍一下facebook广告和谷歌广告的区别.通过二者的对比,我们就会对facebook广告有更深的认识. 1.受众来源 首先是广告受众的来源不同.谷歌广告强调及时需求,都是通过搜索得来, ...

  9. twitter视频下载php,Twitter推特红心点赞H5动画按钮特效

    Twitter推特红心点赞H5动画按钮特效 代码片段: $('body').on("click",'.heart',function() { var A=$(this).attr( ...

最新文章

  1. 列表导航栏实例(01)
  2. Jupyter Notebook: 解决build docker-stacks时conda太慢的问题
  3. 一篇文章搞定面试中的二叉树题目(java实现)
  4. 银行喜欢全额还款的客户,还是喜欢最低还款客户?--编辑
  5. html选中列表整列变色,excel选中行变色完整代码和动画效果
  6. 接口_简单get接口_第一个接口
  7. qt如何把dll封装到exe中_QT在VS2013中的配置
  8. 为什么很多人赚不到钱?
  9. Spring Security 02
  10. python实现复联4影评数据词云可视化分析
  11. 5分钟快速入门大数据、数据挖掘、机器学习
  12. android app 经纬度,经纬度定位app
  13. 北航数理统计大作业_数学146分上岸复旦大学大数据学院统计学,备考经验分享!...
  14. 希望我这是最后一次谈SaaS
  15. 网易云信im即时通讯,php网易云信im即时通讯,tp,demo,即时通讯
  16. iOS客户端monkey测试
  17. 全面解读VTL(虚拟磁带库)
  18. 001.SML状态机
  19. Oracle学习XII —— Oracle集合运算
  20. 使用python实现地理位置查询经纬度

热门文章

  1. 信息学奥赛一本通C++语言——1011: 甲流疫情死亡率
  2. python3.4和3.6的区别_详解Python3.6正式版新特性
  3. centos 7 firefox启用java_一文详解各种花里胡哨的Java调试技巧,多图预警,记得收藏...
  4. 一起学习C语言:函数(三)
  5. android https详解,如何使用HTTPS和HTTP来解析Android中的JSON数据?
  6. Numpy之Broadcasting
  7. super和this关键字详解
  8. java 几种类_Java 中有几种类型的流?
  9. vantUI组件:Grid宫格 - 案例篇
  10. java addall equals_Java究极打基础之ArrayList篇