why does the following javascript return empty data?
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
var accessToken = response.authResponse.accessToken;
console.log("accessToken:", accessToken);
//mainCall(accessToken);
FB.api('/me/events/',
'GET',
{
"pretty":"1",
"limit":100,
"access_token": accessToken
},
function(response) {
newVue(response); // small vue.js template
console.log(response);
});
}
} );
if I separately get the access token, hardcode it then call FB.api I get an array of 100 results as expected.