简体   繁体   English

iOS 6:提示用户登录Facebook

[英]ios 6: prompt user to log into facebook

I'm using UIActivityViewController to use facebook integration within my app. 我正在使用UIActivityViewController在我的应用程序中使用Facebook集成。 I've observed that in order for the Facebook option to be displayed in the list of displayed options, the user needs to be logged into Facebook on their device in the settings prior to entering that UIActivityViewController. 我观察到,为了在显示的选项列表中显示Facebook选项,用户需要在进入该UIActivityViewController之前在其设备上的设置中登录Facebook。

I'd like to prompt the user to log into Facebook and allow my app access to their account prior to invoking the UIActivityViewController. 我想提示用户登录Facebook,并允许我的应用程序在调用UIActivityViewController之前对其帐户进行访问。 Is there a way to prompt the user to log into Facebook on their device (I guess I'm looking for a redirect or hook to the Settings app, with a callback)? 有没有一种方法可以提示用户在其设备上登录Facebook(我想我正在寻找重定向或通过回调连接到“设置”应用程序)?

Note: I'd like to avoid using the Facebook SDK, and use the purely Apple supplied framework. 注意:我想避免使用Facebook SDK,而使用纯Apple提供的框架。

It's not possible with UIActivityViewController . UIActivityViewController是不可能的。

But you can achieve same function via SLComposeViewController . 但是您可以通过SLComposeViewController实现相同的功能。

I created a forked project OWActivityViewController that implement the same function as Apple's built-in Photos app's share action sheet through SLComposeViewController . 我创建了一个分叉项目OWActivityViewController实现相同的功能,通过苹果内置的照片应用的分享动作片SLComposeViewController

OWActivityViewController use the purely Apple supplied framework, compatible with iOS 5, hope this could help you somehow. OWActivityViewController使用完全由Apple提供的框架,与iOS 5兼容,希望这可以以某种方式对您有所帮助。

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

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