简体   繁体   English

iPhone上的Twitter OAuth登录页面

[英]Twitter OAuth Login Page on the iPhone

I have Twitter integrated into my application, with the help of Sharekit. 在Sharekit的帮助下,我将Twitter集成到了我的应用程序中。 Everything works pretty well except, if the user happens to tap on the "Sign Up" link on the Login/allow page, it goes to a non-sign up error page. 除了用户碰巧在“登录/允许”页面上的“注册”链接外,其他所有内容都运行良好,它将转到非注册错误页面。 Either a "Sorry that page doesn't exist" or "Hold up! Sorry the profile you were trying to view was suspended due to strange activity." “抱歉,该页面不存在”或“按住!抱歉,您尝试查看的个人资料由于异常活动而被暂停”。

The account I'm using is working as far as logging in, posting etc. But that link seems to go off into space. 我正在使用的帐户在登录,发布等方面都可以正常使用。但是该链接似乎已消失。 Also if I click on the "Twitter Gear"/Application Icon the dialog (web view with the Twitter OAuth Authorize page loaded) just closes. 同样,如果我单击“ Twitter Gear” /应用程序图标,对话框(加载了Twitter OAuth授权页面的Web视图)将关闭。

I can't find anything about how to configure stuff like this and everything else seemed to work pretty easily. 我找不到有关如何配置此类内容的任何信息,其他所有内容似乎都很容易工作。 The closest reference I could find was,this link Twitter API Issue 1045 我可以找到的最接近的参考是,此链接Twitter API Issue 1045

Thanks in Advance for any help 在此先感谢您的帮助

Update: I've been checking a few other apps with Twitter support. 更新:我一直在检查其他一些具有Twitter支持的应用程序。 Most of the ones I've checked (TUAW,Joystiq,TFLN) seem to have rolled their own Twitter Login Page (using XAuth I assume) the one I found that uses the Twitter OAuth page (Shazam) actually takes you to mobile Safari and it exhibits the same behavior. 我检查过的大多数网站(TUAW,Joystiq,TFLN)似乎都已滚动了自己的Twitter登录页面(我假设使用XAuth),我发现使用Twitter OAuth页面(Shazam)的页面实际上将您带到了移动Safari,它表现出相同的行为。 Maybe I need to roll my own login? 也许我需要滚动自己的登录名?

I suggest you go into the ShareKit class files, go to the two .m files that have "twitter authorization" (im not sure which of the two it is, a simple search on xcode should find it) and change the invalid url that it is being sent to to this URL: https://mobile.twitter.com/signup 我建议您进入ShareKit类文件,转到具有“ Twitter授权”的两个.m文件(我不确定这是哪两个,只需在xcode上进行简单搜索就可以找到它)并更改无效的URL被发送到以下URL: https : //mobile.twitter.com/signup

That should fix your problem! 那应该解决您的问题!

When you implement twitter integration, you should not use the library which you used in older projects but download new twitter library. 在实现Twitter集成时,不应使用旧项目中使用的库,而应下载新的Twitter库。 I had some problems with twitter oauth when I used older library. 使用较旧的库时,twitter oauth出现了一些问题。 But after download and use new library, the issue was fixed. 但是下载并使用新库后,此问题已解决。

I suggest using a packet sniffer on your device to determine the exact URL being called when you click the "Sign Up" link. 我建议您在设备上使用数据包嗅探器来确定单击“注册”链接时正在调用的确切URL。 There are plenty of ways to do this, but it is easier on jailbroken phones. 有很多方法可以做到这一点,但是在越狱的手机上更容易实现。 Armed with the URL, you can see if it is potentially something you are doing wrong or indeed a twitter bug. 有了该URL,您可以查看它是否可能是您做错了或者确实是Twitter错误。

Try Jan Rain it makes it easy to integrate this functionality without errors. 试试Jan Rain,它可以轻松集成此功能而不会出错。

http://www.janrain.com/products/engage/mobile http://www.janrain.com/products/engage/mobile

Here is a ShareKit folk I am using: https://github.com/baotuo/ShareKit 这是我正在使用的ShareKit人员: https : //github.com/baotuo/ShareKit

It looks do not have your issues and have much more improvement. 看起来没有问题,还有很多改进。 You should give it a try. 您应该尝试一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM