Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to confirm client-side Facebook app login from server side

I have a very similar question to this question.

I have a REST API connecting to an iOS app. I can get Facebook login working from the iOS client side, no probs. My question is how to ensure, from the server side, that the user is logged in client side.

As in the above linked question, I have concluded that it comes down to being able to retrieve the authorisation token from the server side. So the user logs in client side, and my own app's user record is tied to the Facebook user ID. When a request gets to the server, based on my own app user ID, I look up the Facebook user ID tied to my user record, and make some kind of HTTP request to the Facebook API to say "please confirm that this user is logged into my app" (based on my app ID).

Crucial question is exactly how to do this? Looks like the kind of answer that would be in this document, but for the life of me I can't find it - they all seem to assume URL redirection.

Thanks in advance for any and all help!

like image 886
user700774 Avatar asked Oct 11 '11 07:10

user700774


1 Answers

Check out this answer, I think it's exactly what you're looking for: Design for Facebook authentication in an iOS app that also accesses a secured web service

like image 168
Greenwell Avatar answered Oct 10 '22 05:10

Greenwell