To day iam working with facebook js sdk it is very easy to get user details after user login to facebook.
<script src="http://connect.facebook.net/en_US/all.js"></script> <script type="text/javascript"> FB.init({ appId : 'your AppId', status : true, cookie : true, xfbml : true }); FB.login(function (response) { getFBuserData (); }); function getFBuserData () { FB.api('/me', function(data){ var userdetails = data.first_name+ data.last_name + data.id+data.gender+data.link+data.birthday+data.email; alert(userdetails); }) } </script>
No comments:
Post a Comment