使用iOS5中的Twitter框架提示登录提醒? [英] Prompt login alert with Twitter framework in iOS5?

查看:189
本文介绍了使用iOS5中的Twitter框架提示登录提醒?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如大家可能知道的那样,因为iOS5有一个原生的Twitter框架,可以很容易地从你的应用发布推文。

As you all may know, since iOS5 there is a native Twitter framework which make it easy to post tweets from your app.

有没有办法提示警告将用户转发到设置应用程序并询问用户名和密码?

Is there a way to prompt an alert that forwards the user to the settings app and ask for username and password?

我知道我可以使用以下代码解决问题:

I know that i could solve the problem with the following code:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];

但那是未记录的代码..

But thats undocumented code..

提前致谢

关注Billy
(我在SO上的第一篇文章)

Regards Billy (My first post on SO)

推荐答案

你不需要实现这个,如果你设置你的Twitter集成在Twitter上发帖并且iOS检测到没有设置Twitter帐户它会自动为你做这个!

You don't need to implement this, if you set up your Twitter integration to make a post on Twitter and iOS detects that there is no Twitter account set up it will do this automatically for you!

这是我在iOS 5.1上的iPhone 4S上运行的一个应用程序的屏幕截图

This is a screenshot of one of my apps running on my iPhone 4S on iOS 5.1

删除首选项链接是参考开发人员的自定义操作,如链接到您自己的首选项菜单。这不适用,因为Twitter不仅是iOS 5的内置功能,而且弹出通知您的UIAlertView不是由开发人员处理的,它是iOS的自动功能。

The removal of Preferences links is in reference to custom actions by the developer, as in linking to your own preferences menu. This does not apply because not only is Twitter a built in function of iOS 5 but the UIAlertView that pops up to notify you isn't handled by the developer, it is an automatic function of iOS.

这篇关于使用iOS5中的Twitter框架提示登录提醒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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