1

新しいツイートを投稿した後に Twitter tweds を更新したいのですが、そのために次のコードを使用します

    <?php 
 // ZET DE STANDAARD TIJDZONE(VERPLICHT VOOR HET OMZETTEN NAAR EEN FORMATTEERBARE STRING)
 date_default_timezone_set('Europe/Amsterdam');
if(!empty($_POST['tweetpost'])) {
// Set status message
$tweetMessage = $_POST['tweetpost'];//'This is a tweet to my Twitter account via PHP.';

 // Post the status message
 $connection->post('statuses/update', array('status' => $tweetMessage));

// from here it stops      

 $home_timeline1 = $conn->get('statuses/home_timeline');  
 // ZET DE TWEETS IN BEELD EN ZET DE created_at IN DE FORMAT DIE WE WILLEN HEBBEN.
echo 'uuuuuuuu';
 //echo '<div id="twitlast">';
echo 'ja hoor';
 foreach ($home_timeline1 as $status) 
 {
         echo "<table width='100%' border='0'>".
                 "<tr><td style='border-top:1px solid grey;background-    color:black;height:80px;width:40%;".
                     "color:yellow;'>".$status->user->name."<br /><img src='".$status->user- profile_image_url_https.
                     "'></td><td style='border-top:1px solid black;border-right:1px solid      black;width:100%'>".
                     $status->text."</td></tr>".
                 "<tr><td style='background-color:black;height:80px;border-bottom:1px solid >grey;width:40%;'></td>".
                 "<td style='border-bottom:1px solid black;border-right:1px solid  black;width:100%'>". 
                     date('l j M \- g:ia',strtotime($status->created_at)) ."</td></tr></table>";
 }
 //echo '</div>';

}
 ?>
 </div>

上記のコードで、コードが停止する場所を述べましたが、その理由は何ですか? ツイートを投稿してからもう一度ツイートを読みたいのですが、ステータスの更新後に機能しません

4

0 に答える 0