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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:29:35+00:00 2026-05-30T12:29:35+00:00

Truthfully I didn’t know how to title my question. I’m testing a facebook signup

  • 0

Truthfully I didn’t know how to title my question. I’m testing a facebook signup api with my app. I have my localhost:8000 url and my livesite url. What I want to do, is have it recognize which one I’m using (local vs live url)

I thought this would work:

<a href="https://www.facebook.com/plugins/registration.php?client_id=98493fakenumber239&redirect_uri=settings.SITE_URL+"social_login/facebook/&fields=%5B%7B%22name%22%3A%22name%22%2C%22view%22%3A%22prefilled%22%7D%2C%7B%22name%22%3A%22first_name%22%7D%2C%7B%22name%22%3A%22last_name%22%7D%2C%7B%22name%22%3A%22email%22%7D%2C%7B%22name%22%3A%22password%22%7D%5D" class="facebook"></a>

Any ideas? Your help is very much appreciated.

  • 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-30T12:29:36+00:00Added an answer on May 30, 2026 at 12:29 pm

    Just use {{ request.get_host }} in your code where you want the current domain. (Assumes you’re using context_instance=RequestContext(request), Django 1.3’s render method, or class-based views).

    UPDATE

    Seems Facebook only allows communication from the domain specified in your app’s settings. So, simply telling it to redirect to localhost isn’t good enough. It’ll simply give you the error that you got. Your best bet is likely going to be editing your hosts file on your local machine and adding an entry like:

    127.0.0.1    mydomain.com
    

    In *nix environments (OSX, Ubuntu, etc.), you’ll find the hosts file at /etc/hosts. In Windows it’s at C:\Windows\System32\drivers\etc\hosts.

    This will route all requests to the domain from your local machine back to your local machine. Obviously, you’ll then need to remove this from your hosts file after development to be able to access your production site.

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

Sidebar

Related Questions

I have done very little with encoding of Text. Truthfully, I don't really even
I know there are plenty of questions about 3d rotation that have been answered
Stupid problem, I have a function that runs a query several times in a
I'm in the process of cleaning up a MySQL database and have to make
My current issue is that an assembly that I changed works on my localhost
Suppose we have buyers and sellers that are trying to find each other in
I hope I can explain this clearly. I have a table, lets call it
Newbie Scala Question: Say I want to do this [Java code] in Scala: public
I'm trying to prevent a user from disabling style.(I HAVE A GOOD REASON TO
I'm working on a site with a simple php-generated twitter box with user timeline

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.