Jump to content

Twitter API date issues


Xtremer360

Recommended Posts

For some reason the time is always staying the same throughout the listing tweets even when there's posts with different times. What am I doing wrong?

 

function getTwitterStatus($userid, $x) {

$url = "http://twitter.com/statuses/user_timeline/$userid.xml?count=$x";

 

$xml = simplexml_load_file($url) or die("could not connect");

 

foreach ($xml->status as $status) {

$text .= "<tr>";

$text .= "<th>" . date("m/d/Y - g:ia", strtotime($xml -> status[0] -> created_at));

"</th>";

$text .= "<td class=\"full\">" . $status -> text . "</td>";

$text .= "<td><img src=\"images/ball_grey_16.png\" class=\"block cr-help\" alt=\"\" title=\"Twitter Message\"/></td>";

}

 

echo $text;

}

Link to comment
https://forums.phpfreaks.com/topic/246757-twitter-api-date-issues/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.