FB.login(function (response) {
FB.api('/me', function (response) {
FB.api(
"/19416515615516/likes",
function (response) {
var fbPages = [];
if (response && !response.error) {
var pageAvailable = Object.values(response['data']).some(n => n.name === 'ArmPaper Idea');
function refreshData() {
x = 5;
if (pageAvailable == false) {
console.log("Not Include");
} else{
console.log("Include");
}
setTimeout(refreshData, x * 1000)
}
refreshData();
}
}
);
});
});
if (pageAvailable == false) {
console.log("Not Include");
} else{
console.log("Include");
}