我正在使用 https://twitteroauth.com/在我的一些 PHP 页面中。我想获取用户访问 token 和访问 secret token 。我在这个页面上得到了答案:How to get user Access Token and Access Secret with the Twitter API using php
在两个页面上替换我的消费者 key 和 secret 消费者 key 之后。我将它上传到我的服务器上,但是当我打开 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
谁能告诉我这个错误是关于什么的?我是否遗漏了什么或其他什么。
最佳答案
The new interface simplifies this: if you provide a placeholder callback URL in the field for it in your application detail screen, it allows you to use dynamic callbacks. So just go ahead and put a placeholder in there (doesn't have to be the actual dynamic/runtime callback you use) and you'll be able to use other forms of auth.
When no placeholder is presented, the application is locked to OOB mode.
关于php - 如何获取推特的用户访问 token ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33529917/