RECENT POSTS BELOW

Visit :Mobile Daddy

Nov 28, 2010

HOW TO ADD FACEBOOK SIGN IN BUTTON TO YOUR WEBSITE/BLOG?

HOW TO SIGN IN USING FACEBOOK




Hello guys today i m going to tell you the Facebook log in button .If your site or blog doesn't have a log in option you don't need to go in deep to make databases for log in or register page . Here is the simple solution which i m going to tell you about the use of Facebook to sign in to your site or blog. If you want that people coming to your site log in to your site instead of not having the LOG IN option than just follow the below given steps :
For this you need a JavaScript SDK  in  a simple way to log in or sign up to your site or blog. Once a user log in to your site you with his or her Facebook account , you can find the information about user from Facebook. User is logged in to your site as long as he is logged in to Facebook .


For using the feature you have to register your application with the Facebook to get an app id for your site. You can use one app id for your base  domain , once you have your app id ,then just  paste the following code to bottom of your page :

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: 'your app id', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('auth.sessionChange', function(response) {
if (response.session) {
// A user has logged in, and a new cookie has been saved
} else {
// The user has logged out, and the cookie has been cleared
}
});
</script>



With the API initialized, you can pop up a Facebook authorization dialog by calling the FB.login JavaScript method, or you can include the standard Facebook login button with the <fb:login-button> tag:


<fb:login-button></fb:login-button>

0 Responses to “HOW TO ADD FACEBOOK SIGN IN BUTTON TO YOUR WEBSITE/BLOG?”

Post a Comment

Next previous home

Join The TechMyriad Community

All Rights Reserved @2011TechMyriad - Communnity of Technology
----
Back to TOP