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

  • SEARCH
  • Home
  • 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 7673773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:35:23+00:00 2026-05-31T16:35:23+00:00

I’m following Ryan Bate’s instructions for using Omniauth to set up third party authentication,

  • 0

I’m following Ryan Bate’s instructions for using Omniauth to set up third party authentication, except that I’m trying it with Facebook rather than Twitter, which he sets up in RailsCast 235.

After installing omniauth-facebook gem, and setting up the initializer

Rails.application.config.middleware.use OmniAuth::Builder do
    provider :facebook, 'APP_ID', 'APP_SECRET'

end

I should be able to go to localhost:3000/auth/facebook and be presented with the Facebook login (even though it won’t eventually work because we haven’t set up the callback url yet) However, when i go to that url, I get this error

{
   "error": {
      "message": "Error validating application.",
      "type": "OAuthException",
      "code": 101
   }
}

and the url actually changes to

https://graph.facebook.com/oauth/authorize?response_type=code&client_id=APP_ID&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Ffacebook%2Fcallback&scope=email%2Coffline_access

On my app, I’ve set up Devise and followed the instructions on the Devise wiki for integrating Facebook authorization https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview

Can anyone tell me what the problem might be?

Doing a Google search on the error message revealed that quite a few people have experienced this problem in recent weeks but couldn’t find anyone with a solution
enter image description here

  • 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-31T16:35:24+00:00Added an answer on May 31, 2026 at 4:35 pm

    I searched for 101 and I stumbled upon this page. As you can see, that error stands for Invalid API key, so I believe that the problem lies in where you defined your key.

    You should set up your key and your secret in a separate file (for clarity and security) but be mindful that Rails loads files in alphabetical order so the file that defines those constants should have a name that comes before the file that configures the oauth connection. In my case, I created a file called constants.rb, which comes before devise.rb. Also, make sure to keep this file away from source control. You don’t want other people to have your keys and secrets.

    # config/initializers/constants.rb
    FACEBOOK_KEY = 'string'
    FACEBOOK_SECRET = 'string'
    

    Then configure your connection in your devise file if you are using devise or in your omniauth file if you are using simple omniauth:

    # config/initializers/devise.rb|omniauth.rb
    require 'omniauth-facebook'
    config.omniauth :facebook, FACEBOOK_KEY, FACEBOOK_SECRET
    

    Now, there is a better way to do this using ENV variables. I recommend the Figaro gem as it really simplifies configuring apps.

    If you want to display the facebook dialog page as a popup, you’ll want to use

    config.omniauth :facebook, FACEBOOK_KEY, FACEBOOK_SECRET, :display => 'popup'
    

    And follow this question later down the road.

    And, if you are on Windows, you’ll need a certificate so that the SSL connection does not fail. The solution to this problem is clarified by Arcolye here.

    Finally, to test your login locally, all you need to do is define your Site URL as http://localhost:3000/. That’s all there is. You do not have to define your canvas URL.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the

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.