JSFiddle - React, Tailwind, and code Playground
by jrm2k6
JavaScript
$(function() {
$("#test").click(function() {
$("#contentAuthResponse").html('<p>Access token is :' + FB.getAuthResponse().accessToken + '</p>');
test = FB.api('/me', function(response) {
alert(response.id);
$("#userInformation").html('<p>User information :<br />Gender :' + response.gender + '<br />Name :' + response.name + '(' + response.username + ')' + '<br />Picture : ' + '<img src="https://graph.facebook.com/' + response.username + '/picture"></img> </p>');
});
return false;
});
});