0

https://api.twitter.com/1.1/users/show.json?screen_name=screen-name&include_entities=true

不管用。

获取错误的身份验证数据错误。

Twitter 集成也遇到了同样的错误。如何解决这个错误?

4

1 回答 1

0

您需要使用 oAuth。

例如使用此类 - https://github.com/abraham/twitteroauth 还必须创建应用程序才能获得所需的密钥($consumer_key、$consumer_secret、$oauth_token、$oauth_token_secret)。并从时间线获取例如推文,只需执行此代码

    require_once(dirname(__FILE__) . '/libs/twitteroauth.php');
$connection = new TwitterOAuth($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret);
    $response = $connection->get('statuses/user_timeline', array('screen_name' => $twitter_name));
    echo '<pre>'.print_r($response,1).'</pre>';
于 2013-07-02T16:46:58.247 回答