Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6701739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:58:13+00:00 2026-05-26T06:58:13+00:00

My problem is on facebook callback url. I am using fbgraph gem on Rails

  • 0

My problem is on facebook callback url. I am using fbgraph gem on Rails 3.0.

I ask for extended permissions on my tab application. So in the callback I wait code parameter and access_token.

I extract this code from fbgraph official GIT repository.

    def authorize
        begin
          @auth.client.authorization_code = params[:code]
#In access_token line should return me access__token but throw a error message (see below)
          access_token = @auth.client.access_token! # => Rack::OAuth2::AccessToken
          @facebook_user = FbGraph::User.me(access_token).fetch # => FbGraph::User
    #MORE CODE WITHOUT IMPORTANCE
          redirect_to :controller => "dashboard", :action => "index"
        rescue Exception => e
           logger.info(e.message)
        end
      end

Throw this error message:

Rack::OAuth::Client::Error # => @status = 400, Message => Missing redirect uri

Please I need help quickly. Excuse me and thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:58:14+00:00Added an answer on May 26, 2026 at 6:58 am

    I’m using the fb_graph gem which is similar. In order to get the access_token you also need to supply the callback URI – this is the fb_graph version:

    client.redirect_uri = "http://your.callback.uri"
    client.authorization_code = params[:code]
    access_token = client.access_token!
    

    Update:

    Looking at the fbgraph gem documentation I think you need to replace these two lines:

    @auth.client.authorization_code = params[:code]
    access_token = @auth.client.access_token!
    

    With this:

    access_token = @auth.client.authorization.process_callback(params[:code], :redirect_uri => callback_url)
    

    To be honest I looked at using the fbgraph gem but the documentation was so bad that I switched to fb_graph instead which is similar and actually has some useful examples in the documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with the Facebook login. Currently I'm using login url (getLoginUrl(
I'm using CakePHP to produce a Facebook application (though the problem is not Facebook
I'm building my first Facebook Connect application, and am running into an odd problem.
We are facing one problem with facebook. we integrated FB in our web application,
I am having a problem with facebook authentication in facebook Page Tab. I am
Okay... I'm having the following problem - in my facebook application I let people
I'm having a problem now with Facebook share button. The url i use for
TL;DR version: Can you authenticate with Facebook without having a callback URL for a
could someone help me on this problem, i want to access facebook API through
I'm facing a strange problem right now... I'm trying to use Facebook API to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.