【问题标题】:How to get oauth_verifier in TwitterOAuth for PHP如何在 TwitterOAuth for PHP 中获取 oauth_verifier
【发布时间】:2017-11-15 13:34:38
【问题描述】:

我已经收到oauth_token

$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token, $access_token_secret);
$content = $connection->get("account/verify_credentials");

$request_token = $connection->oauth('oauth/request_token', array('oauth_callback' => 'oob'));
$oauth_token = $request_token['oauth_token'];

我需要得到oauth_verifier 以进行下一步:

$token = $connection->oauth("oauth/access_token", ["oauth_verifier" => $oauth_verifier]); 

我该怎么做?我知道oauth_verifier 可以在$_REQUEST 中找到,但是我需要什么请求才能做到这一点?

【问题讨论】:

    标签: php twitter twitter-oauth


    【解决方案1】:

    https://code.tutsplus.com/tutorials/how-to-authenticate-users-with-twitter-oauth-20--cms-25713

    从上面的链接你可以得到更多的信息来拥有验证者

    【讨论】:

    • 谢谢。但是我需要编写一个自动读取某些用户的公共推文的应用程序。没有用户的任何操作,如下所示:sitepoint.com/twitter-1-1-oauth-php(但此链接中的代码返回给我[message] => Sorry, that page does not exist [code] => 34
    猜你喜欢
    • 2022-01-03
    • 2013-12-14
    • 1970-01-01
    • 2015-07-20
    • 2017-04-17
    • 2016-07-14
    • 2012-01-20
    • 2015-06-28
    • 2018-03-26
    相关资源
    最近更新 更多