1

Asked this accidently as an answer in another thread, (sorry guys, new to the site) we'll try and do it right this time:

I really need to add a date/time, or a unix date to my tweets through my single user Twitter API 1.1 I've searched in vein for an answer to this. All I find everywhere are other people asking the same question.

I've included the posting code below:

// Send a tweet
$code = $connection->request('POST', 
$connection->url('1.1/statuses/update'), 
array('status' => "Mindless Test" ));
// A response code of 200 is a success

I use twitter for automated control on a non profit web site, in a private twitter account. (Wish they would let private accounts send duplicate tweets.) Adding time will cure it if I can figure out how.

4

1 回答 1

0

如果我理解正确,这只是将日期添加到状态的情况。您可以通过以下方式获取当前时间戳time(): // 发送推文 $code = $connection->request('POST',

$connection->url('1.1/statuses/update'), 
array('status' => "Mindless Test".time() ));//Adding timestamp
// A response code of 200 is a success

如果您想添加更好的日期,可以查看 PHP日期函数。

于 2013-06-13T15:43:54.417 回答