Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 627
lennysan Avatar asked Nov 05 '22 07:11

lennysan


1 Answers

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.

like image 107
lennysan Avatar answered Nov 09 '22 02:11

lennysan