lennysan
lennysan

Reputation: 1350

Accessing a public Facebook profile in UIWebView (with access_token)

Problem: Viewing a public Facebook profile without being authenticated into Facebook shows a bare-bones profile. I have the users access_token. Is there any way to use the access_token to show the user a profile as if they were authenticated, or authenticate them behind the scenes before sending them to the profile page in order to see the full profile?

Specifically, I'm loading a Facebook profile in a UiWebView, which does not have access to the cookie pool of Safari, and so the user is not able to see the full profile. The user has already authenticated with my app, and so I have their access token, which I'm hoping I can use without forcing them to re-authenticate.

I know this is somehow possible because the Foursquare iPhone app accomplishes it. If you look at another users Facebook profile, you are able to see the full profile as if you were logged in. Next step is to sniff the traffic to try to figure it out, but wanted to see if there was an obvious solution I was missing first.

Upvotes: 5

Views: 2918

Answers (2)

lennysan
lennysan

Reputation: 1350

Turns out this is only possible if you had logged into FB in a UIWebView of that particular application at some point in the past. Once you do that, it caches your credentials across all future sessions.

Upvotes: 2

DMCS
DMCS

Reputation: 31870

Play around with the Graph API Explorer since you already have the token. https://developers.facebook.com/tools/explorer There you can learn what you can and cant do with the API. Once you get used to that, then you can learn the iOS stuff via http://developers.facebook.com/docs/reference/iossdk/

Upvotes: 0

Related Questions