I have been trying to integrate Facebook, Youtube and Dailymotion and have been successful to some extent. The only problem I am facing is Dailymotion doesnt accept 'localhost' as the redirect url, so I need to put the loopback address (127.0.0.1). While for Facebook,I can put the loopback address in the "Site URL" field, however then I cannot put the same in "App Domains" field without which it doesnt work. Is there a way to do this?
Related
Hope you are doing good. i am new to Django so basically i want an idea of how we can access page that required login but i want one time login not every time.or just by pass this authentication by any mean i don't know?
i-e: i have chat bot i want to give that page specific url to some client and that client add that url in his website so his clients just use my chatbot by click my chatbot url that are present in my client website.but i want that by clicking that url does not require to login first but i want the secure access only that client domain only access my url . not other domain or from chrome brower.
if you give any idea it will be very kindness of you thanks alot.
my-sloution:
i used django-cors but i dont know that using cors will restrict access to other domain accept the allowed one?
i experence from cors-test websites i just send post request but cannot access my site when i allowed that domain in cors then they can get post response .
so basically when i search that url from chrome on same LAN ( by using ngrok to make local server global ) we can access pages but cannot make post request. i had added ngrok url in not allowed domain in cors. so this confused me.
the chatbot url page has login so how we by pass the login required by any method for every client that click from my client website so they can easly access my chatbot??
I am trying to integrate facebook login in my django app but everytime I click on facebook login button it gives me an error
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
I my app settings my site url is
http://localhost:8000/
and also in my hosts file localhost have been mapped to 127.0.0.1
how to solve this as I have followed similar questions on stack but none helped a lot.
In your host file, set the localhost:port to the domain you wish to log in from.
Then, set the Facebook app's domain to the domain you've pointed your localhost to.
I've added facebook login to my site. However, when I click the signin button, I get a red box that says:
'Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.'
When I dig deep, I find that my Nginx server is sending a request to facebook from http://mydomain.com:8001/usersignin, I believe facebook doesn't accept :8001 in the URL, How can I prevent :8001 appending to the URL ?
See the port_in_redirect directive
In our Java EE app we are invoking the fb oauth flow to get accessToken.
For this purpose we make a call with the callback url to the fb server with app key and secret.
At this moment the same url is provided in the fb app url section.
However, is it possible if we can some how change the redirect url to go to a different server ? I have seen just changing the callback url in the code does not work. Looks like it has to be same in the code as well as in the fb application.
This make very difficult to test or use the same app to try things from two different web servers.
Any advise on this?
This is unfortunately not possible. Just redirect user to your redirect_uri which will redirect you to the correct location
The URL to redirect to after the user clicks a button in the dialog.
The URL you specify must be a URL of with the same Base Domain as
specified in your app's settings, a Canvas URL of the form
https://apps.facebook.com/YOUR_APP_NAMESPACE or a Page Tab URL of the
form https://www.facebook.com/PAGE_USERNAME/app_YOUR_APP_ID
https://developers.facebook.com/docs/reference/dialogs/oauth/
For security reasons you can't change the redirect url. Facebook check that you provide the same redirect url as you gave when you registered the application. The way I solved this was to register one application on facebook for each server.
Here is Solution from Promo Group
One of the options - to add a 2nd domain (address mirror the primary site) in
Settings » Basic tab at the top» Mobile Site URL
I'm developing a Django application. I need to authenticate users using Facebook and get the user's friends list to invite them to my site. To do this my application has to be registered with Facebook to get the API key. In the process of doing so I'm struck with the list of settings.
"http://localhost/login" --> this is the login page in my application where I have the Facebook-connect button
I need Facebook to redirect the response to "http://localhost/result", where I have a view to parse the result.
Please let me know how to configure Facebook.
Facebook can't redirect the response to 'localhost', as that's obviously local to your machine, hence the name. Your app needs to be somewhere Facebook's servers can actually see it - ie on a public host somewhere.
In other words, you can't develop and test a Facebook app completely on your local machine, as you would with a normal Django app. You'll need to upload it to your host at regular intervals to see any changes.
Alternately, you can set up port forwarding on your firewall/router to allow Facebook to retrieve directly from your localhost. The instructions for doing this vary greatly between different firewall/router manufacturers. What you need to do is open external port 80 and forward it to port 80 (or whatever port you have your HTTP server listening on) on the host machine where your app is, find your public IP address, and then use them as your callback address as follows:
http://<your.ip.here>:80/login
This will allow you to test your FB or FB-Connect app on localhost.