自定义 iOS Twitter 身份验证页面? [英] Custom iOS Twitter Authentication page?
问题描述
我正在制作一个移动应用程序,用户可以在其中将他们的 Twitter 帐户连接到该应用程序.我只是有点好奇什么是最好的方法.
I am making a mobile application where users can connect their twitter accounts to the app. I am just kinda curious what's the best way to do it.
现在,我希望能够制作自己的自定义页面(无需使用 UIWebView).
Right now, I would love to be able to make my own custom page (without having to use a UIWebView).
这可能吗?如果怎样,怎样?
Is this possible? If how, so?
谢谢.
推荐答案
据我所知,您不希望用户被重定向到 Twitter 的 OAuth 授权网页.您可以改用 xAuth,但您必须向 Twitter 发送一封电子邮件,说明为什么要这样做,并且在您的应用程序处于非常晚的开发状态(当您的应用程序几乎完成时)之前,他们不会允许 xAuth 用于您的应用程序.您可以在 Twitter 开发文档中找到 xAuth 的手册.
As I understand, you don't want the user to be redirected to Twitter's OAuth authorization web page. You can use xAuth instead, but you have to send Twitter an email why you want this, and they won't allow xAuth for your app until it is in a very late development state (when your app is almost complete). You can find the manual for xAuth in the Twitter development documentation.
基本上,xAuth 的作用是允许桌面和移动应用程序跳过 request_token
和授权步骤并直接跳转到 access_token
步骤.这样,您可以为用户提供自定义字段(例如 UITextField
对象)来填写他们的用户名和密码.只要确保不要将它们保存在任何地方,只保存访问令牌.祝你好运.:)
Basically, what xAuth does is it allows desktop and mobile applications to skip the request_token
and authorize steps and jump right to the access_token
step. This way, you can provide the user with custom fields (e.g. UITextField
objects) to fill their username and password in. Just make sure you don't save them anywhere, only the access token. Good luck. :)
这篇关于自定义 iOS Twitter 身份验证页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!