Wie man die Anzahl der Facebook Seite gefällt

meine folgende Skript zeigt nicht die Anzahl der fb-Seite-gerne mehr...

$ch = curl_init("http://graph.facebook.com/FACEBOOKPAGE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw);
$scm_fb = $data->likes;
echo $scm_fb;

Versuchte ich auch, den folgenden code, aber diese zeigt auch nichts...

$page_id = "FACEBOOKPAGE"; 
$likes = 0; //Initialize the count

//Construct a Facebook URL
$json_url ='https://graph.facebook.com/'.$page_id.'';
$json = file_get_contents($json_url);
$json_output = json_decode($json);

//Extract the likes count from the JSON object
if($json_output->likes){
    $likes = $json_output->likes;
}

(Ich habe auch versucht, das Facebook-Page-ID anstelle der pagename, das Ergebnis ist dasselbe)

irgendwelche Vorschläge?

InformationsquelleAutor Tom | 2015-03-10
Schreibe einen Kommentar