简体   繁体   English

如何使用ios sdk在Facebook上未经许可对话框登录?

[英]How can i login without permission dialog on facebook with ios sdk?

in my application on iphone when i call 在我打电话时在iPhone上的应用程序中

[facebook authorize:permissions delegate:self];

the framework show login dialog automatically if i'm not loggedin, and then show permission dialog (This is great for the frist time that a user use the application). 如果我未登录,框架会自动显示登录对话框,然后显示权限对话框(这对于用户首次使用该应用程序来说非常有用)。 But if i've aleady get permission i always show the dialog with message "You have aleady authorized this application". 但是,如果我已获得铅的许可,我将始终显示带有消息“您已对该应用授权了铅”的对话框。

So, how can i login without show permission dialog? 那么,如何在没有显示权限对话框的情况下登录? Or can i check if i've aleady get permission to the application? 或者我可以检查我是否已经获得了该应用程序的许可?
In the framework sample code the only way to login is by authorize method... 在框架示例代码中,唯一的登录方法是使用authorize方法。

Thanks in advance. 提前致谢。

您可以在设备上本地存储访问令牌(确保请求offline_access权限),然后在下一次用户使用您的App时检查该令牌是否仍处于活动状态(调用/ me / permissions或类似的东西)-如果是仍处于活动状态,您无需返回Facebook重新进行身份验证-如果不是,则您当前使用的登录代码仍然可以。

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

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