Search code examples
google-app-enginefacebookoauthopenidtwitter-oauth

How to add Facebook/Twitter/LinkedIn login to Google App Engine project?


I've searched for solutions, but everything I can find seems mostly outdated.

We're using the Python API for GAE and creating login urls in the following manner:

users.create_login_url(continue_url, "Yahoo", "http://yahoo.com/"),

Which works fine for sites such as Google, Yahoo, Aol, Blogger, Flickr, etc... but we're aware that Facebook and Twitter don't work in this manner.

Can anyone show any examples of how to authenticate users on App Engine using Facebook, Twitter, and LinkedIn?

Thanks!


Solution

  • First, one has to register their application on Facebook and get an Application ID. Details: Register here Facebook authentication overview

    Then, I used the facebook python SDK, along with the facebook javascript api (which is the canonical way to do authentication with facebook). Here's a working example of authenticaion I used.

    Direct link to the Facebook python SDK

    Direct link to the Facebook Javascript SDK