Skip to content

Instantly share code, notes, and snippets.

@dleavitt
Created September 28, 2011 03:09
Show Gist options
  • Save dleavitt/1246892 to your computer and use it in GitHub Desktop.
Save dleavitt/1246892 to your computer and use it in GitHub Desktop.
Facebook OAuth2 Instructions

Javascript

  • Basic approach is to do a project-wide search for FB. and do the below:
  • add oauth: true to FB.init call
  • in the response from FB.login, FB.getStatus, etc., change session to authResponse. It will be null if they user didn't allow, as with session.
  • replace all use of the terms perms with the term scope
  • Doesn't look like we can check permissions in the response?
  • Update all FB.event.subscribe calls listening for events with session in the name to listen for equivalent authResponse events.
  • session.uid is now authResponse.userID
  • session.access_token is now session.accessToken
  • whereas previously, when authenticating and making an API call on a subsequent page, the API call seemed to work immediately, with the access token passed along. This does not appear to be the case anymore - all API calls that require auth should be within an FB.login or FB.checkLoginStatus callback.

Lower Priority

  • change FB.Canvas.setAutoResize to FB.Canvas.setAutoGrow

Ruby

koala-rails

  • If used in Rails 3.1, should be updated to the development branch: gem "koala-rails", git: 'https://github.com/stevenh512/koala-rails.git', branch: 'development'
  • If used in Rails 3.0 use my fork: git://github.com/dleavitt/koala-rails.git
  • Explicitly state Koala dependency: gem 'koala', ' >= 1.2.0'

koala

  • Make sure bundled version is at least 1.2

eukaliptus

  • Use my version: https://github.com/dleavitt/eukaliptus/
  • Don't use any of the view helpers.

PHP

AS3

Resources

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment