Ahmed Nawara
Ahmed Nawara

Reputation: 349

Displaying a fan page in a UIWebView with an authenticated user session using Facebook's access token

We're developing an app for iOS and Android that has a rather odd requirement. One of the tabs of the app opens up the client's Facebook page. So here's our desired functionality:

  1. The user logs in using Facebook's SDKs (for iPhone and Android)
  2. We retrieve the access token and our application flow starts
  3. When the user clicks the Facebook Page tab we load a UIWebView pointing to the URL of Facebook page.
  4. The user should be able to interact with the Facebook page right away.

So what happens is steps 1-3 work normally. However, because this UIWebView hasn't been authenticated on Facebook before, it doesn't have a valid session. Hence the user is required to login again in this web view in order to interact with the page.

Is there a way to use the token that we have from the Facebook login process when loading the UIWebView in order to avoid having to sign in again?

Thanks.

Upvotes: 6

Views: 323

Answers (1)

keen
keen

Reputation: 3011

I haven't tried wht are you trying. But i am opening other user's profile page,and its working. I am doing it this way. https://graph.facebook.com/search?q=SEARCH_STRING&type=user&access_token=USER_ACCESS_TOKEN. Hope it will help you.

Upvotes: 0

Related Questions