I am trying to display the feed into my console using a console.log however it is returning an error of no token.
message: "An active access token must be used to query information about the current user." type: "OAuthException" error code : 2500;
the message above is what I am getting. I have followed the steps given by FB.
The code is bellow.
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '',
xfbml : true,
version : 'v2.1',
});
FB.api('/me', {fields: 'last_name'}, function(response) {
console.log(response);
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "http://connect.facebook.net/en_UK/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div id="fb-root">
</div>