1

我想在发布新推文后更新 twitter tweeds,为此我使用以下代码

    <?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