简体   繁体   English

使用ShareKit登录Facebook并使用登录凭据查看页面?

[英]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. 我有一个kludgy问题,请在我尝试解释时请耐心等待:我正在开发一个iPhone应用程序,允许用户通过加载URL的Uiwebview来查看他们发布的图片: https://www.facebook我的应用程序中的.com / hashtag / foodporn

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. 我想让我的应用程序的用户能够以最小的麻烦查看这个,问题是当我启动Uiwebview时,他们被迫登录查看foodporn主题标签。 Since it is not Safari they must login each time because the credentials are not stored. 由于它不是Safari,因此每次都必须登录,因为未存储凭据。

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. 我正在考虑使用ShareKit登录Facebook,然后我可以存储凭据,然后将登录凭据传递给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? 所以我的问题是:是否有可能从shareKit获取Facebook的存储凭据,然后将其传递到Uiwebview而无需用户再次登录?

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: 我看到了2个场景:
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. 1.从XCode运行应用程序 - >使用链接加载WebView - >需要登录 - >登录 - >再次从XCode运行应用程序 - >使用链接加载WebView - >需要登录。
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. 2.从XCode运行应用程序 - >使用链接加载WebView - >需要登录 - >登录 - > 从模拟器中杀死应用程序 - >从模拟器再次运行应用程序 - >不需要登录。

So, make sure that You are not using only first scenario, because it looks like credentials should be stored. 因此,请确保您不仅使用第一个方案,因为它看起来应该存储凭据。

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

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