Created
March 8, 2012 12:37
-
-
Save georgi/2000824 to your computer and use it in GitHub Desktop.
Facebook Mobile Hack Demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Callback endpoint for server side flow | |
# Takes a OAuth code parameter and creates a user if necessary | |
get "/auth" do | |
client = Facebook.exchange_code(params[:code], url('/auth')) | |
user = User.from_facebook(client) | |
session[:user] = user.uid | |
redirect '/' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment