【问题标题】:Twitter integration(android)- api v1.1Twitter集成(android)- api v1.1
【发布时间】:2013-06-19 06:39:59
【问题描述】:

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

不工作。

Getting Bad Authentication 数据错误。

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

【问题讨论】:

    标签: android twitter


    【解决方案1】:

    您需要使用 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>';
    

    【讨论】:

      猜你喜欢
      • 2016-02-04
      • 1970-01-01
      • 1970-01-01
      • 2013-09-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-10
      • 2013-07-24
      相关资源
      最近更新 更多