2011-09-06 24 views

回答

5

這是非常簡單的,你可以通過圖形API URL做得一樣,對如。

http://graph.facebook.com/http://digimantra.com

下面是做到這一點的功能 -

function fb_fan_count($facebook_name){ 
    // Example: https://graph.facebook.com/digimantra 
    $data = json_decode(file_get_contents("https://graph.facebook.com/".$facebook_name)); 
    echo $data->likes; 
} 
相關問題