有人能告诉我这似乎是什么问题吗
       <?php 
      $increment =0;
      foreach($status['comments']['data'] as $user_status_comments_value){?>
我得到一个
警告:在第 179 行的 /var/www/social/facebook/social/examples/dev.php 中为 foreach() 提供的参数无效
有人能告诉我这似乎是什么问题吗
       <?php 
      $increment =0;
      foreach($status['comments']['data'] as $user_status_comments_value){?>
我得到一个
警告:在第 179 行的 /var/www/social/facebook/social/examples/dev.php 中为 foreach() 提供的参数无效
你需要重新排列你的代码
foreach($status['data'] as $statusupdate) {
    $user_status_comments_value = $statusupdate["comments"]
    //Dont forget you would still need to loop through each set of comments
    foreach($user_status_comments_value as $comment) {
        ///$comment["data"] contains a comment
        ...
    }
}
这意味着$status['comments']['data']不是数组。