1

Facebookからより多くの投稿を取得する方法はありますか?Facebookから少なくとも200件の投稿を取得する必要があるサイトを開発しています。現在、24件の投稿のみを取得しています。200件の投稿を取得することは可能ですか?

 $user_posts = json_decode(@file_get_contents(
           'https://graph.facebook.com/me/posts?access_token='.$access_token));
$user_posts = (array)$user_posts;
$user_posts = $user_posts['data'];
echo "<h1>Posts</h1>";
foreach($user_posts as $user_post){
    $user_post = (array)$user_post;

    echo "<table border='8' width='500'>";
    if(($user_post['picture'])||($user_post['message'])){
        echo "<tr>";
        echo '<td height="4"></td>';
        echo "<td>";
        if($user_post['message']){
            echo "<tr><td>Message : ".$user_post['message']."</td></tr>";
        }
           }
    }

ありがとう。

4

1 に答える 1

1

私はこれに対する答えを見つけました。URLに制限フィールドを追加するだけです。

$ user_posts = json_decode(@file_get_contents('https://graph.facebook.com/me/posts?access_token='.$access_token。'&limit = 200'));

于 2011-07-06T20:22:53.130 に答える