Twitter回调网址 [英] Twitter Call back URL

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

问题描述

我正在使用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 Code = -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 Apps网站上,必须非常明确地设置回调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_CN/docs/basics/callback_url.html

More documentation is listed here: https://developer.twitter.com/en/docs/basics/callback_url.html

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

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