佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1774|回复: 2

Dynamic Facebook Like Button for Blogger

[复制链接]
发表于 6-2-2012 08:40 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'><b:if cond='data:post.isFirstPost'> <script>(function(d){  var js, id = 'facebook-jssdk';   if (d.getElementById(id)) {return;}  js = d.createElement('script'); js.id = id; js.async = true;  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";  d.getElementsByTagName('head')[0].appendChild(js);}(document));</script></b:if> <fb:like expr:href="data:post.url" layout='standard' send='true' show_faces='false' font="arial" action="like" colorscheme="light"></fb:like></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 ^^
回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 8-2-2012 04:18 PM | 显示全部楼层
updated。new edited interface
回复

使用道具 举报

发表于 15-5-2013 06:38 PM | 显示全部楼层
Do you have any ideas to add facebook like box to a post?
回复

使用道具 举报

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

本版积分规则

 

ADVERTISEMENT


本周最热论坛帖子本周最热论坛帖子

ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 24-9-2025 09:48 PM , Processed in 0.100800 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表