簡體   English   中英

如何在本地主機上為Facebook App發出連接請求

[英]How to do a connect request for the Facebook App in localhost

我正在為當前位於locahost中的應用程序使用Facebook身份驗證創建登錄名。 我在Facebook中創建了一個應用。

現在,當我嘗試訪問此URL時: https://www.facebook.com/dialog/oauth?client_id=my_app_id&redirect_uri=http://localhost:8080/ : https://www.facebook.com/dialog/oauth?client_id=my_app_id&redirect_uri=http://localhost:8080/ http: https://www.facebook.com/dialog/oauth?client_id=my_app_id&redirect_uri=http://localhost:8080/ localhost: https://www.facebook.com/dialog/oauth?client_id=my_app_id&redirect_uri=http://localhost:8080/

我收到此錯誤:

Given URL is not permitted 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.

然后,我嘗試將localhost添加到我的應用程序設置“ App Domains並且在此出現另一個錯誤,無法保存它:

This must be derived from Secure Canvas URL, Unity Binary URL, Site URL, Mobile Site URL or Secure Page Tab URL. Check and correct the following domains: localhost

我做錯了嗎? 還是對本地主機執行此操作的正確方法是什么?

您需要先在應用設置中添加“平台”。

添加平台“網站”,並輸入http://localhost/作為網站URL。 只有在那之后,您才能從本地主機網站調用登錄對話框。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM