Ads 468x60px

Smaller time frame always follow the bigger time frame. It's better wait be patience to enter in position than risk with BIG SL. Having strong trading discipline and taking losses when necessary is a sign of serious trading approach

Tuesday, April 17, 2012

Add a facebook login button to your blogger using html code

UPDATE This is an updated tutorial on how to add a FaceBook Login button to your Google Blog/blogger/blogspot. Since my last post there are a few things that can be done so that the login button shows either when you are going directly to your personal blog or viewing a post. The earlier bug was that the login button was not showing, this has to do with the first step for it to work correctly.

Step One

  • Create an FaceBook App on the Facebook Developers website.  This step is pretty much an easy walk through.  Below is an image of what you need to get your app working correctly.  Once you create your Facebook app it does take a little while for it to work on the website/blog so be patient.

  • In the image below make note that the following fields need to be completed.  This set-up is a basic format.  Once you create the Facebook app, this will help to promote your website as well.

Click to Enlarge

Step Two

  • Now that your Facebook app is ready the rest is very easy.  Go to the blogger design site and select the blog you wish to add the Facebook Login Button to.
  • Select the Layout button and add a new Gadget, scroll down the list and select the HTML/Javascript Gadget.

Step Three

  • In the window copy and paste the following code:
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); = id;
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script><div class="fb-login-button" data-show-faces="true" data-width="200" data-max-rows="1"></div>

Click Save and you are done!

IMPORTANT:  An issue that many of you will come across is:

An invalid API key was specified.  

If you read this post prior, it was incorrect.  The reason you will get this error is when you are using the Facebook Login button on a heavily scripted blog.  Another issue is that you will see a big annoying Facebook logo in place of the login button on your blog, the fix to this is to either go and find what the conflicting problem in the HTML of your blog that is causing this error or just back up your blogger template and than select one of the Google Blogspot templates offered.

After doing this myself the error disappeared and the login button works great and  Blogger does have some very nice templates now.

UPDATE: I have posted a more difficult tutorial for those who are running into the above problem.  Another common problem with the heavily scripted blogs is you will see a big ugly Facebook Logo instead of the nice login button like mine on the top left sidepane.

SOURCE comments