1

我有多个 Facebook 粉丝页面,我需要查询 FB.API(以获取有关每个页面的信息)。我注意到,当我需要查询 API 的粉丝页面数量变大时,就会出现严重的性能问题。

 while($row = mysql_fetch_assoc($getFanpages)){
    $url = "https://graph.facebook.com/".$row["link"];
    $data = json_decode(get_data($url));
    $pageName = $data->name;
    //....Get other info from $data (e.g. page link)
 }

是否可以Batch Request用于这样的任务?如果是这样,与我目前拥有的代码相比,该代码的外观如何?

4

0 回答 0