Facebook-ios-sdk with embedded UIWebView

Posted by Benchtop Creative on Stack Overflow See other posts from Stack Overflow or by Benchtop Creative
Published on 2010-12-26T21:22:31Z Indexed on 2013/07/02 11:06 UTC
Read the original article Hit count: 149

Filed under:
|
|

I'm working with the new facebook-ios-sdk and have successfully integrated the api into my native app. I am able to authenticate a user and properly setup permissions using a popup dialog with the ios-sdk classes.

For a portion of my app I need to use the facebook connection within a UIWebView, using javascript and html to process data within the webview. Given that the user is already logged in and authenticated via the above routine, I would have assumed that the UIWebView would share those credentials, or that there would at least be some way to pass or assign the credentials to the webview.

Unfortunately, I found this earlier post which seems to suggest that this scheme doesn't quite work (iOS - being logged-in in a webView after logging in with the SDK). Has anyone else encountered this and/or found a work around? This seems like it would be a fairly straightforward use case given that I'm not trying to launch mobile safari or something like that - it's all within the same native app.

It just seems like there must be some sort of easy trick or setting that I'm missing. Maybe somehow setting cookies in the new UIWebView? or something like this?

© Stack Overflow or respective owner

Related posts about facebook

Related posts about ios