Ich weiß, dass viele solcher Fragen bereits viel gestellt wurden, nachdem ich die Frage gestellt hatte. Mein Problem ist noch ungelöst.
Ich habe eine Webanwendung, in die ich das Facebook-Login mithilfe der Oauth-Authentifizierung eingebettet habe. Ich habe den folgenden Code verwendet, um Facebook bei der Anmeldung mit Java zu helfen
Bis zum letzten Monat hat es gut funktioniert, aber seit einigen Tagen erhalten wir ständig den Fehler: -
URL kann nicht geladen werden Die Domain dieser URL ist nicht in den Domains der App enthalten. Um diese URL laden zu können, fügen Sie alle Domänen und Subdomänen Ihrer App zum Feld App-Domänen in Ihren App-Einstellungen hinzu.
**Setting used are following:-
Website url : **https://www.enggheads.com/**
App Domain : **enggheads.com**
Redirect uri :
1. https://www.enggheads.com/#!login
2. https://www.enggheads.com/#!signup**
SCREENSHOTS:
So, I just want to know whats the issue why I am facing this problem. Is there something which I am missing in the settings section?
Code flows :
Step1. On button click url called--->
"http://www.facebook.com/dialog/oauth?" + "client_id="
+ FB_APP_ID + "&redirect_uri="
+ URLEncoder.encode(REDIRECT_URI, "UTF-8")
+ "&scope=public_profile ";
I am receiving error on this very part where it gives error Can't Load URL The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
I want to share 2 ways for making solution. Hope it will solve your issue.
Facebook now roles some features as plugins. In the left hand side select Products and add product. Then select Facbook Login. Pretty straight forward from there, you'll see all the Oauth options show up.
OR,
Select Products and add product. Then select Facbook Login.
Then added http://localhost:3000/ to the field 'Valid OAuth redirect URIs'
, and then everything worked.
It usually happens if you have entered the wrong details when you created the App in Facebook. Or have you changed a URL's of an existing App?
Can you please recheck the settings of your APP in this page?
https://developers.facebook.com/apps
Credit goes to Lei lionel
I think your access token already expires. So you need to extend access token. For this, please go through this link:
I just want to ask 1 thing more is it possible the app domain error has smthng to do with access token expiration time?
Facebook has an advanced option for obtaining long-lived access tokens for apps that:
If your app is set up like this it should use the process described here to obtain an access token from each client to avoid triggering Facebook's automated spam systems. The end result will be that each client will have its own long-lived access token.
At a high level, this is how you can obtain a long-lived token from the client:
Rufen Sie mit einem langlebigen Benutzerzugriffstoken den folgenden Endpunkt auf:
https://graph.facebook.com/oauth/client_code?access_token=...&client_secret=...&redirect_uri=...&client_id=...
Sie müssen Folgendes eingeben: access_token, client_secret, redirect_uri and client_id.
Die Antwort sieht ungefähr so aus:
{"code": "...."}
Sobald Sie den Code vom Facebook-Server abgerufen haben, müssen Sie ihn über einen sicheren Kanal an den Client senden. Sobald dies erledigt ist, müssen Sie eine Anfrage vom Client an diesen Endpunkt stellen:
https://graph.facebook.com/oauth/access_token?code=...&client_id=...&redirect_uri=...&machine_id= ...
Der Aufruf erfordert die folgenden Argumente:
client_id - Ja
Code - Ja
redirect_uri - Ja
machine_id - Nein
{"access_token":"...", "expires_in":..., "machine_id":"..."}
Dieser Artikel stammt aus dem Internet. Bitte geben Sie beim Nachdruck die Quelle an.
Bei Verstößen wenden Sie sich bitte [email protected] Löschen.
Lass mich ein paar Worte sagen