search
尋找貓咪~QQ 地點 桃園市桃園區 Taoyuan , Taoyuan

[公告] 社群分享按鈕 上線 - iPhone4.TW



最前陣子我加上了「社群分享按鈕」,若你們覺得論壇上面的文章或是教學很讚,可以按這裡分享給你的朋友知道

目前我還沒找到google+的語法可以嵌入,所以暫時就只有這三種

若知道google+怎麼可以做到時,就會加上第四種


透過皮樂的分享

已經加上去Google+的功能

方便大家分享囉



要做到這個功能語法如下



PHP 代碼:
推上facebook

<a href="javascript: void(window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(location.href)) ));" title="推上Facebook"推上臉書 a

PHP 代碼:
推上twitter

<a href="javascript: void(window.open('http://twitter.com/home/?status='.concat(encodeURIComponent(document.title)) .concat(' ') .concat(encodeURIComponent(location.href))));" title="推上twitter"推上twitter a
PHP 代碼:
推上噗浪

<a href="javascript: void(window.open('http://www.plurk.com/?qualifier=shares&status=' .concat(encodeURIComponent(location.href)) .concat(' ') .concat('(') .concat(encodeURIComponent(document.title)) .concat(')')));" title="推上噗浪"推上噗浪 a
PHP 代碼:
推上google+

<
a href="javascript: void(window.open('https://plusone.google.com/_/+1/confirm?hl=zh-TW&url='.concat(encodeURIComponent(location.href)) ));" title="推上Google+"推上Googlea
其中

Google+可以用另外一個專屬網頁來產生你要的語法
http://www.google.com/webmasters/+1/button/

PHP 代碼:


<
g:plusone annotation="inline">g:plusone>


<
script type="text/javascript">
  
window.___gcfg = {lang'zh-TW'};

  (function() {
    var 
po document.createElement('script'); po.type 'text/javascript'po.async true;
    
po.src 'https://apis.google.com/js/plusone.js';
    var 
document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pos);
  })();
 


而facebook也有專屬網頁來生成
https://developers.facebook.com/docs/guides/web/

或是用這個方式
PHP 代碼:
<iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL"
        
scrolling="no" frameborder="0"
        
style="border:none; width:450px; height:80px">iframe


熱門推薦

本文由 iphone4TW 提供 原文連結

寵物協尋 相信 終究能找到回家的路
寫了7763篇文章,獲得2次喜歡
留言回覆
回覆
精彩推薦