We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get this message:
"uninitialized constant FacebookController::OAuth2"
My Controller looks like this:
def start redirect client.web_server.authorize_url( :redirect_uri => redirect_uri, :scope => 'email,offline_access' ) end
def callback access_token = client.web_server.get_access_token(params[:code], :redirect_uri => redirect_uri) user = JSON.parse(access_token.get('/me')) user.inspect end
def client OAuth2::Client.new('id', 'secret', :site => 'https://graph.facebook.com') end
def redirect_uri uri = URI.parse(request.url) uri.path = '/auth/facebook/callback' uri.query = nil uri.to_s end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I get this message:
"uninitialized constant FacebookController::OAuth2"
My Controller looks like this:
def start
redirect client.web_server.authorize_url(
:redirect_uri => redirect_uri,
:scope => 'email,offline_access'
)
end
def callback
access_token = client.web_server.get_access_token(params[:code], :redirect_uri => redirect_uri)
user = JSON.parse(access_token.get('/me'))
user.inspect
end
def client
OAuth2::Client.new('id',
'secret',
:site => 'https://graph.facebook.com')
end
def redirect_uri
uri = URI.parse(request.url)
uri.path = '/auth/facebook/callback'
uri.query = nil
uri.to_s
end
The text was updated successfully, but these errors were encountered: