5

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.

lennysan
  • 1,330
  • 2
  • 13
  • 16
  • One way would be get the friend's profile information using Graph API manage the display of retrieved information yourself. Will be a lot of work but I see this as the only way to bypass re-authentication within your app. – Abduliam Rehmanius May 01 '12 at 20:22

2 Answers2

2

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.

lennysan
  • 1,330
  • 2
  • 13
  • 16
  • 1
    I am doing this what you suggested but its not saving credentials across all future session, It uses only once and then next time you RE-ALLOCATE a UIWEBVIEW in the same application, all previous data is gone. – ShayanK May 24 '12 at 14:02
0

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/

DMCS
  • 31,720
  • 14
  • 71
  • 104
  • 1
    No real luck there, doesn't help me authenticate the user or see their profile as if I were logged in. – lennysan Jan 17 '12 at 01:28