Sunday, 17 July 2011

Add a "Login with facebook" button to your blog.

Ever thought of adding a registration system to your blog so that your viewers can login to your blog ? In wordpress it can be done just by enabling an option in the settings. But the normal registration system may not be appearing very good to you. So you can add a Login with facebook button to your blog. Here is the tutorial for doing that. It is the same for both blogger and wordpress.

1. First of all login to your facebook account.

2. Now your browser to this page.

3. Enter the name of your site and its URL and then click on the Create app button. Dont forget that the URL must end with a trailing slash.

4. Enter the security codes and submit.

5. Now in the following page you can see your API key. Just take a copy of the code and keep it safe in your HDD.

6. Now navigate to this page.

7. Click on the get code button in that page.

8. You will get a code just like the following :

<div id="fb-root"></div><script src="*****************&amp;xfbml=1"></script><fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button>
The only difference will be that the asterix's  will be replaced with your own app ID that you got in step 5.

9. Now just add these codes to your blog and that's it you now have your own "Login With Facebook" button and now your viewers can login to your site using their facebook account.

And thats it. Hope this was a helpful tutorial. Meet you in the next post. Post your reviews or your doubts as a comments. :)