1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Dynamic Facebook Like Button for Blogger

Discussion in 'Blogging' started by AriesXiaoShadow, Feb 5, 2012.

  1. #1
    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:
    <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>
    Code (markup):
    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
    xmlns:fb="https://www.facebook.com/2008/fbml"
    Code (markup):
    right after
    <html
    Code (markup):
    .
    It will look like this:
    <html xmlns:fb="https://www.facebook.com/2008/fbml"
    Code (markup):

    6. Now Save the template and you should see the Like Button near each of your posts. You are done ^^
     
    Last edited: Feb 5, 2012
    AriesXiaoShadow, Feb 5, 2012 IP
  2. av.satyajith

    av.satyajith Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am confused after step 3
     
    av.satyajith, Feb 6, 2012 IP
  3. AriesXiaoShadow

    AriesXiaoShadow Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    have you done step 3? if done step 3, you can procede to step 5, step 4 is just an explaination. =)
     
    AriesXiaoShadow, Feb 7, 2012 IP
  4. peoplesguide

    peoplesguide Member

    Messages:
    157
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #4
    thank you for this great information, i am looking for this for as long time.
     
    peoplesguide, Feb 9, 2012 IP