简体   繁体   中英

iPhone/Facebook/Google App Engine Integration

I am designing an iPhone app which needs the user to login to his/her Facebook account.

The app uses GAE (Google App Engine) as the background server (Python), so the problem now is that I don't know how GAE, iPhone and Facebook authentication works.

My guess is user logs in to FB from iPhone and will get an access_token , and then the iphone app sends the access_token to GAE so that GAE can recognize the user.

Is that correct? Or is there any tutorial about how to cooperate between these platforms?

I have checked out a open source called lean-engine but they do not have available source code for the iphone (only Android).

If possible please post source/github project!!!!

Thanks in advance!

If you have not already found it, the Facebook Platform Python SDK covers what you want, but not exactly written for iPhone.

If your app can get an access_token then you would send it to the "oauth" example of the Facebook Platform Python SDK - to the facebookoauth.py file. You will need to alter the "class LoginHandler" code at least, by default, it is designed to get an access_token out of a cookie. You would just comment out all the cookie-related code and use the access_token from there which can be seen in the facebookoauth.py code.

https://github.com/pythonforfacebook/facebook-sdk/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM