after an hour of research why the facebook api returns no page when given an id, i found out that:
- Javascript Number.Max_save_Integer is smaller than the id i pass to a function
- The id when i call the function is: 10150151614175447
- The id when i log the argument is : 10150151614175448
In general, I have a page id in Javascript and make an ajax call to php, passing that id with GET. Then the data is processed, which i get from the facebook graph api in PHP and return it as JSON.
The PHP worked for all IDs yet, today i got across this ID and didn't find the problem. FB Explorer shows the data. PHP gets all the necessarry data and works for other IDs.
But Javascript makes some interesting things when i simply logged the ID i pass to the function and a coworker said that the ID is different. I didn't even see it in the first place.
var page_id = 10150151614175447;
doSomething(page_id);
function doSomething(page_id) //10150151614175447
{
console.log(page_id); //10150151614175448
}
JsFiddle How can this be prevented or is there a workaround?