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 8206725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:46:13+00:00 2026-06-07T08:46:13+00:00

I am making an app for mobile phone, and I need to use Twitter

  • 0

I am making an app for mobile phone, and I need to use Twitter and Facebook authentications.

My PC and my phone (Samsung Galaxy S2), on which I’m developing, are connected to one router.

My PC IP is 10.4.1.6. For Twitter authentication I just enter callback_url "http://10.4.1.6:3000" and everything works great, but for Facebook authentication I get:

"Invalid redirect_uri: Given URL is not allowed by the Application configuration."

I figured that if I can’t enter the IP of my router then I can edit my hosts files on my phone and my PC to point to my Rails server, but still, no luck.

When I try to enter "http://rails_dev_work_pc.com:3000", Facebook is telling me that the URL is invalid. How can I fix this error?

EDIT:
I tried to enter this:

  • domain => “localhost.com”
  • callback_url => “http://localhost.com:3000/auth/facebook/callback“
  • in pc hosts => “127.0.1.1 localhost.com”;
  • in phone hosts => “10.4.1.6 localhost.com

But I get the same error on my phone and my PC.

Also:

  • domain => “localhost”
  • callback_url => “http://localhost:3000/auth/facebook/callback“
  • in my pc hosts => “127.0.1.1 localhost”;
  • in phone hosts => “10.4.1.6 localhost

works fine on the PC, but on my phone I get the invalid URL error.

I’m out of ideas..

  • 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-06-07T08:46:14+00:00Added an answer on June 7, 2026 at 8:46 am

    I’m using this setup:

    In hosts file, route localhost to localhost.com (or whatever you prefer). Now you should be able to use the following facebook app configuration:

    App Domain(s): localhost.com
    Website for facebook login: http://localhost.com:3000/
    Canvas-URL (optional): http://localhost.com:3000/<yourfacebookendpoint>
    

    Please let me know if this works for you as well. Also, I found it very helpful to have 2 facebook applications – one used for production (pointing to your production app URL) and one for testing only (pointing to your URL configured in the HOSTS file). That way, you can make tests without disrupting your production app.

    EDIT

    Here is the final solution that @ExEdzy posted as an edit to this answer:

    I Just changed in hosts files this “localhost localhos.com” to “ip localhost.com”

    In my phone the ip is ip of my pc (10.4.1.6). And in my pc hosts file the ip is “127.0.0.1”

    And in facebook:
    – App Domains: => “http://localhost.com:3000”
    – Site URL: => “http://localhost.com:3000/auth/facebook/callback”
    Worked like a charm.

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

Sidebar

Related Questions

Iam making an app which has one index.php file. I also have these other
I'm making a phone gap query mobile iOS app for course evaluation at my
I'm making a mobile app using phonegap. That is to say, it's all done
I'm making a mobile HTML5 app. I've disabled scrolling (and enabled it on certain
I'm making a mobile web app. At the top of the page, I have
i m making APP which do image proceesing using java SE.i want to check
I'm making an app where I need to save the text in multiple views
I'm making an app on PhoneGap using Jquery Mobile. The app runs fine on
I'm making an PhoneGap app using Jquery Mobile, but I have a little problem
I am currently making a mobile app where the server needs to calculate 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.