Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 1402|回复: 1
打印 上一主题 下一主题

Dynamic Facebook Like Button for Blogger

 关闭 [复制链接]

16

主题

0

好友

33

积分

初级会员

Rank: 1

跳转到指定楼层
1#
发表于 2012-2-6 08:49 PM |只看该作者 |倒序浏览
How to add Facebook like button on your blog post:

1. Use the configurator to customize your favorite Facebook like button. Go here to configure your code.

Default Code:
  1. <div style='float:left'>
  2. <b:if cond='data:post.isFirstPost'>
  3. <script>(function(d){
  4.  var js, id = 'facebook-jssdk';
  5.  if (d.getElementById(id)) {return;}
  6.  js = d.createElement('script'); js.id = id; js.async = true;
  7.  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  8.  d.getElementsByTagName('head')[0].appendChild(js);
  9. }(document));</script>
  10. </b:if>
  11. <fb:like expr:href="data:post.url" layout='standard' send='true' show_faces='false' font="arial" action="like" colorscheme="light"></fb:like>
  12. </div>
复制代码
2. Copy the code above. Login to your Blogger Account and go to Design > Edit HTML and click on the check box which says “Expand Widget Templates”.

3. Look for <data:post.body/> and place the copied code below or above of it.
     *Above - if you want the Facebook like button appear before the post.
     *Below - if you want the Facebook like button appear after the post.

4.Next you have to add the fb namespace to your template tag.Your template should have the specification for the fb tag that you have used. The following namespace declaration will take care of that. To declare the namespace, find <html on the top of the template code.

5. Place
  1. xmlns:fb="https://www.facebook.com/2008/fbml"
复制代码
right after
  1. <html
复制代码
.
It will look like this:
  1. <html xmlns:fb="https://www.facebook.com/2008/fbml"
复制代码
6. Now Save the template and you should see the Like Button near each of your posts. You are done ^^




已有 1 人评分论坛通知 收起 理由
叛逆志文 + 1 这里是中文论坛,如果要分享请翻译成华语或 ...

总评分: 论坛通知 + 1   查看全部评分

收藏收藏0

16

主题

0

好友

33

积分

初级会员

Rank: 1

2#
发表于 2012-2-8 04:16 PM |只看该作者
回复 1# miniram

bump


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2025-1-8 03:41 AM , Processed in 0.103079 second(s), 29 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部