I have a simple PHP code that fetches Facebook graph API's value (total number of likes of a certain fanpage) via JSON. It works perfectly fine for the vast majority of fan pages but for 3 (out of 17 fan pages that I track) it simply can't read and print that value.
I don't understand where's the problem since the data I want to fetch is publicly available and the same code is applied for all pages.
Here's the code that prints correct value for a fan page with ID 214014840762:
<?php
$currsiteurl = 'http://graph.facebook.com/214014840762';
$graph = json_decode(file_get_contents($currsiteurl));
$currnofans = $graph->likes;
echo "Number of likes: ".$currnofans; // prints out 107936
?>
But if I simply change the ID to 160788560626000 or 167134649991034 the same code doesn't work anymore and it doesn't print anything.
Thanks in advance!