tengo esto en mi cabecera:Como llegar Información de usuario usando JS SDK después de iniciar sesión en Facebook
<script src="http://connect.facebook.net/en_US/all.js"></script>
Entonces tengo el código del botón FB entrada como esta:
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=myAppId&xfbml=1">
</script><fb:login-button show-faces="false" perms="user_hometown,user_about_me,email,user_address"
autologoutlink="true" width="200" max-rows="1">
</fb:login-button>
Luego, después de el usuario inicia sesión con el botón FB, ¿cómo hago una llamada JS para obtener su nombre, correo electrónico, foto, etc.?
También encontré algo de código como este, pero no sabe dónde esta se utiliza:
<script>
FB.init({
appId : 'myAppId',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelURL : 'http://www.comehike.com/channel.html', // channel.html file
oauth : true // enable OAuth 2.0
});
</script>
¿Es necesario el código justo encima?
Gracias!
Usted necesita 'código FB.init' para inicializar el Facebook JavaScript SDK y analizar el XFBML. – jBit