如何获得twitter';s用户访问令牌


How to get twitter's user Access Token?

我正在使用https://twitteroauth.com/在我的一些PHP页面中。我想获得用户访问令牌和访问机密令牌。我在这个页面上得到了我的答案:如何使用php 通过Twitter API获得用户访问令牌和访问机密

在替换了两个页面上的消费者密钥和秘密消费者密钥之后。我把它上传到我的服务器上,但当我打开twitter-go.php 时,我出现了以下错误

Fatal error: Uncaught exception `'Abraham'TwitterOAuth'TwitterOAuthException'` with message 
'<?xml version="1.0" encoding="UTF-8"?>
<hash> 
    <error>Desktop applications only support the oauth_callback value 'oob'</error>
    <request>/oauth/request_token</request>
</hash> '
in `/home/mediahyp/public_html/tweetme/twitteroauth/src/TwitterOAuth.php:138` 
Stack trace: 
#0 /home/mediahyp/public_html/tweetme/twitter-go.php(13): Abraham'TwitterOAuth'TwitterOAuth->oauth('oauth/request_t...', Array) 
#1 {main} thrown in /home/mediahyp/public_html/tweetme/twitteroauth/src/TwitterOAuth.php on line 138

有人能告诉我这个错误是怎么回事吗?我是不是错过了什么。

https://twittercommunity.com/t/desktop-applications-only-support-the-oauth-callback-value-oob-oauth-request-token/252/2

新接口简化了这一点:如果您在应用程序详细信息屏幕的字段中为其提供占位符回调URL,则可以使用动态回调。因此,只需在其中放置一个占位符(不必是您使用的实际动态/运行时回调),您就可以使用其他形式的身份验证。

如果没有显示占位符,则应用程序将锁定到OOB模式。