Twitter 回调 URL [英] Twitter Call back URL

查看:97
本文介绍了Twitter 回调 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 twitter SDK 与 ios 应用程序集成.当我按照所有步骤创建客户密钥并将其放入我的应用程序时.当我运行该应用程序时,它会显示[TwitterKit] 确实遇到了消息错误

I am working with twitter SDK to integrate with in ios app.When i follow all the step and create the customer key and put it in my app.When I run the app it show "[TwitterKit] did encounter error with message

获取用户身份验证令牌时出错.":错误域=TWTRLogInErrorDomain代码=-1 "此客户端应用程序未批准回调 URL.可以在您的应用程序中调整已批准的回调 URL设置" UserInfo={NSLocalizedDescription=回调 URL未批准用于此客户端应用程序.批准的回调 URL 可以在您的应用程序设置中进行调整"

"Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings" UserInfo={NSLocalizedDescription=Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings"

如何解决这个问题?

推荐答案

我遇到了同样的问题,并且 TwitterKit 文档不准确或 Twitter 更改了他们的政策.无论如何,在 Twitter 应用程序站点上,必须非常具体地设置回调 URL.回调 URL 应采用以下格式:

I had the same problem and the TwitterKit documentation is not accurate or Twitter has changed their policies. In any case, on the Twitter Apps site, the callback URL has to be set very specifically. The callback URL should be in the format:

twitterkit-{consumer/api key}://

例如:

twitterkit-128238aKjqlp123AKdasdf://

此外,这需要在您的 Info.plist 中完全相同地注册:

Also, this needs to be registered in your Info.plist exactly the same:

<dict>
<key>CFBundleURLSchemes</key>
<array>
    <string>twitterkit-128238aKjqlp123AKdasdf</string>
</array>
</dict>

此处列出了更多文档:https://developer.twitter.com/zh/docs/basics/callback_url.html

这篇关于Twitter 回调 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆