简体   繁体   中英

Use ShareKit to login to Facebook and use login credentials to view page?

I've got a kludgy problem, please bear with me as I try to explain it: I am working on an iPhone app that allows users to view pictures they have posted by loading a Uiwebview of a URL: https://www.facebook.com/hashtag/foodporn within my app.

I want to have users of my app be able to view this with minimal hassle, the problem is that when I launch the Uiwebview they are forced to sign in to view the foodporn hashtag. Since it is not Safari they must login each time because the credentials are not stored.

I was thinking of using ShareKit to login to facebook, and then I could store the credentials and then pass the login credentials to the Uiwebview.

So my question is this: is it possible to get the stored credentials for Facebook from shareKit and then pass that onto the Uiwebview without having the user login again?

I don't think that this is possible, but it was strange for me, that user has to login each time, so I tested it. I saw 2 scenarios:
1. Run app from XCode -> Load WebView with Your Link -> Login Required -> Login -> Run app from XCode once more -> Load WebView with Your Link -> Login Required.
2. Run app from XCode -> Load WebView with Your Link -> Login Required -> Login -> Kill the app from Simulator -> Run app again from simulator -> Login not Required.

So, make sure that You are not using only first scenario, because it looks like credentials should be stored.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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