Created
February 4, 2013 13:51
-
-
Save johndel/4706847 to your computer and use it in GitHub Desktop.
Omniauth Helper File
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
def omniauth_facebook | |
OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({ | |
:provider => 'facebook', | |
:uid => '1234567', | |
:info => { | |
:nickname => 'jbloggs', | |
:email => '[email protected]', | |
:name => 'Joe Bloggs', | |
:first_name => 'Joe', | |
:last_name => 'Bloggs', | |
:image => 'http://graph.facebook.com/1234567/picture?type=square', | |
:urls => { :Facebook => 'http://www.facebook.com/jbloggs' }, | |
:location => 'Palo Alto, California', | |
:verified => true | |
}, | |
:credentials => { | |
:token => 'ABCDEFGHIJKLMN', # OAuth 2.0 access_token, which you may wish to store | |
:expires_at => 1321747205, # when the access token expires (it always will) | |
:expires => true # this will always be true | |
}, | |
:extra => { | |
:raw_info => { | |
:id => '1234567', | |
:name => 'Joe Bloggs', | |
:first_name => 'Joe', | |
:last_name => 'Bloggs', | |
:link => 'http://www.facebook.com/jbloggs', | |
:username => 'jbloggs', | |
:location => { :id => '123456789', :name => 'Palo Alto, California' }, | |
:gender => 'male', | |
:email => '[email protected]', | |
:timezone => -8, | |
:locale => 'en_US', | |
:verified => true, | |
:updated_time => '2011-11-11T06:21:03+0000' | |
} | |
} | |
}) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment