Facebook-Login: URL kann nicht geladen werden Die Domain dieser URL ist nicht in den Domains der App enthalten

Vartika:

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:

Instrumententafel

Grundeinstellung der App

Die Fblogin-Einstellung wurde über Produkt hinzufügen im rechten Bereich hinzugefügt

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?

UPDATE

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.

SkyWalker :

I want to share 2 ways for making solution. Hope it will solve your issue.

Solution 1:

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.

Solution-2:

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

  1. Select the correct App and click in the edit button;
  2. Check the URLs & paths are correctly entered and are pointing to the site where you have installed Ultimate Facebook plugin.

Credit goes to Lei lionel

UPDATE1:

I think your access token already expires. So you need to extend access token. For this, please go through this link:

  1. Extend Facebook access token (make it 60days last)
  2. Expiration and Extension of Access Tokens

Resource Link:

  1. Generate "never-expire" access token for Facebook Page
  2. Do Facebook Oauth 2.0 Access Tokens Expire?

UPDATE2:

I just want to ask 1 thing more is it possible the app domain error has smthng to do with access token expiration time?

Ans:

Generating Long-Lived User Tokens from Server-Side Long-Lived Tokens

Facebook has an advanced option for obtaining long-lived access tokens for apps that:

  1. Have their own authentication system (using a username/password for example)
  2. Store, on their servers, a Facebook access token for people using it that they send to different clients (browser or native mobile apps)
  3. Make API calls from all of those clients

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:

  1. Make a call to Facebook's server from your server using a valid and current long-lived token to generate a code. (This assumes you've already obtained a long-lived token via Facebook Login. If the token you're using is invalid or expired, you'll have to obtain a new one by making the person using your app log in again.)
  2. Securely send that code to the client.
  3. The client then exchanges the code for a long-lived token.
  4. The client can use the long-lived token to post stories or query data.

Getting the code

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 lautet:

Die Antwort sieht ungefähr so ​​aus:

{"code": "...."}

Einlösen des Codes für ein Zugriffstoken

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

Die Antwort sieht folgendermaßen aus:

{"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.

bearbeiten am
0

Lass mich ein paar Worte sagen

0Kommentare
LoginNach der Teilnahme an der Überprüfung

Verwandte Artikel

TOP Liste

  1. 1

    So legen Sie mit dem Interface Builder unterschiedliche führende Speicherplätze für unterschiedliche Geräte fest

  2. 2

    Fügen Sie eine weitere Schaltfläche zu gwt Suggest Box hinzu

  3. 3

    Wie konvertiere ich einen Vektor von Bytes (u8) in eine Zeichenfolge?

  4. 4

    Wie kann ich in SCSS mehrere Klassen zu einer einzigen kombinieren?

  5. 5

    Wie konvertiert man einen Datenrahmen im langen Format in eine Liste mit einem geeigneten Format?

  6. 6

    Speichern Sie ein MPAndroidChart-Diagramm in einem Bild, ohne es in einer Aktivität anzuzeigen

  7. 7

    Gruppieren Sie Datenrahmenspalten nach ihrem Datum (die Spaltentitel enthalten) und fassen Sie die Instanzen von Einsen und Nullen in R . zusammen

  8. 8

    Tomcat - Leiten Sie den alten Kontextstamm zum neuen Kontextstamm um

  9. 9

    Eclipse Oxygen - Projekte verschwinden

  10. 10

    Wie wählt man Unterschiede mit drei Tabellen aus?

  11. 11

    Tic Tac Toe-Spiel im React-Reset-Button funktioniert nicht

  12. 12

    So berechnen Sie die Verfügbarkeit von Anwendungen (SLA)

  13. 13

    ElasticSearch BulkShardRequest ist aufgrund von org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor fehlgeschlagen

  14. 14

    Wie kann ich den Kaskadenmodus global einstellen?

  15. 15

    Python: Spalten mit demselben Namen zusammenführen, wobei der Mindestwert beibehalten wird

  16. 16

    So erhalten Sie eine gleichmäßige Höhe für alle Eingabefelder

  17. 17

    Wie erstelle ich einen neuen übergeordneten Knoten außerhalb der .ref (/ path) in der Firebase-Echtzeitdatenbank mithilfe von Cloud-Funktionen (Typescript)?

  18. 18

    Was ist schneller: SUM über NULL oder über 0?

  19. 19

    Wie kann ich eine verschachtelte Schleife mit lapply in R ersetzen?

  20. 20

    Kann ich ein Tkinter-Canvas erstellen, das mehrere Zeilen in einem Text-Widget umfasst?

  21. 21

    Ärgerliches Problem mit yaml, das ich nicht lösen kann

heißlabel

Archiv