FB.api function is used to
get basic details (Name, profile image, gender, user id, friends list, any information
we shared publically) of logged in user from facebook.

If you need access to more information,
such as the user's email address, etc. you must request permissions for this
information. For that we need to add permission to scope attribute of the Login Button and our FB.api function will be like this

Your first version with log in/ log out reloading worked great right away. But this version doesn't work at all for me. The div class="fb-login-button" autologoutlink="true" scope="email,user_checkins" throws warnings as autologoutlink is not a property of a div. And it doesn't work because it's not a clickable element. What's missing?

@Pat Patterson...autologoutlink is not a property of a div it is id of hyper link. Please check the code and implement in your application. For your information it's latest code which is working perfectly.

Really supeb post, i had wasted alot of my time here and there and nothing exactly worked. I got the post at 9 page of google result which just worked magically by simply changing the app_id and no alot of efforts. Once thanks alot.....

Sir, Though the tutorial works perfect when i login for the first time and giving app id , but when i am in debug mode and running the website next time without logging out, it shows a javascript error "Object doesn't support this property or method" below the head section. Am i doing something wrong??

hello sir...I have getting some problem to access this code. when I run this code to log in throw Facebook if I enter my Facebook id & password it fetch my name, email id which I need, but the problem is when I tried to log in throw another Facebook ID & password its not working & shows an error message. As I think though I am the admin of my app its shows my data properly but in case of others its not working... Please help me out

This is very nice. helped me a lot.but i am facing one problem. The code in the script is running on page load. means if i am already logged in with Facebook account and then comes to my page in which i write this code then it automatically display my information. I want it should display my information after i click on login with Facebook button.??plz help me in this

Facebook login logout work for the single user which user create api inside facebook but It's not work for other user they have not any API id ?So kinldy reply for this issue,I am new to develop sharing data in facebook with login and logout features.

Your post is very useful for me. But when i login with faceBook it does not dispaly the name and profile image.It displayed: Facebook Login Authentication Example"login with facebook" please help me.........

your post is well and good. but i have a problem to display my facebook account. while i execute this code i have an issue like 'Closed' is null or not an object.This error raise in javascript.how can i fix it?can you give some suggestion.please urgent..This is my mailid : psathya@topazts.com

To redirect user after logged in Im using the below function, issue is, this is not redirecting me to my desired page. Please help with this, thanks.Fb.Event.subscribe('auth.login', function () { window.location = 'http://google.com'; });

Sir your post is to good and working on local server.when i was deploy it on server ,facebook login is working but not getting value on our own page ,alert are not working and i want to redirect to other page but not working..pls help i spend last 2 days to solve this problem pls sir or any buddy help me....

This all worked great. But one thing I'm struggling with; how do I pass the email address of user id to the page's VB.Net? I need to run SQL queries on a database using the facebook userid displayed as the WHERE predicate. Any advice would be greatly appreciated.

Hi, Ruggers here. This is a nice article which you have explained. I've implemented in my project. :) Could you please let me know, is there any way to avoid the "Login" button click and show the login window in the screen after the page load itself inside an iframe or something like that?

hi suresh Still I can,t get user mobile number with using fb.api.I had search on website i got detail is permission is not allowed to get mobile number and address.Please give instruction to me to get mobile number