【发布时间】:2014-06-23 06:12:18
【问题描述】:
<?
// here we want to send the article to twitter
require_once('twitteroauth.php');
// Twitter Connection Data
$tConsumerKey = 'xxxx';
$tConsumerSecret = 'xxxx';
$tAccessToken = 'xxxx';
$tAccessTokenSecret = 'xxxx';
// start connection
$tweet = new TwitterOAuth($tConsumerKey, $tConsumerSecret, $tAccessToken, $tAccessTokenSecret);
// the message
$message = 'Auto Tweet via PHP ...';
// send to twitter
$tweet->post('statuses/update', array('status' => $message));
?>
这是我的代码 .. 它不会发送推文。是关于 localhost 还是其他什么? 我在 windows7 上使用 xampp ..
【问题讨论】:
标签: php twitter xampp localhost twitter-oauth