How to display the value of first_name in a div block?
function getInfo() { FB.api('/me', 'GET', {fields: 'first_name,last_name,name,id,email'}, function(response) { document.getElementById('status').innerHTML = response.first_name; }); }
Output in <div id="status"></div>
, but after clicking on Get Info, how to do it without clicking, but right away?