【问题标题】:Twitter does not connect with localhost PHPTwitter 无法与 localhost PHP 连接
【发布时间】: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


    【解决方案1】:

    您将哪个库用于 OAuth?是针对您制作的应用还是针对其他人?

    如果您可以在 Twitter 开发者专区编辑和检查设置,那么这个关于在您的 twitter 应用程序中使用 localhost 的问题可能对您在验证您的应用程序时进行回调很有用。

    Twitter oAuth callbackUrl - localhost development

    我发现它在开发期间想要连接应用程序时很有用。使用 127.0.0.1。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-23
      • 2017-05-11
      • 1970-01-01
      • 2014-11-07
      • 2014-10-19
      • 2019-06-07
      • 2016-11-05
      相关资源
      最近更新 更多