GG資源網

WordPress主題,使用Facebook登錄不在localhost上工作

問題描述:

I am using wordpress themes on localhost on a mac device. I tried on two different themes the Facebook login feature that they integrate in their settings and on both I get the same 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.

Just to mention that earlier I have written a simple AngularJS project and tested the Facebook Login on localhost and it worked fine. I mentioned local.foo.com as the website on facebook developer when creating new App and I edited the /etc/hosts file on mac and added the entry: 127.0.0.1 local.foo.com to make it work.

Now, when trying it on the wordpress themes, I created a new App on facebook developer, and I mentioned local.foo.com as the website (same as I did when I created the working AngularJs example). I used the new App Id in the theme settings, and when trying to login I got the error mentioned above on 2 different themes. I used the same settings that I used for the working AngularJS App. The following image shows the settings on facebook.

Facebook settings

Note that I tried to enable more options and to fill the Valid OAuth Redirect URIs field with entries like http://localhost/lovestory corresponding to what appears when I open the app in browser (for example http://127.0.0.1:8888/lovestory), but facebook does not accept anymore URIs with http, since they require only https.

圖片轉代碼服務由CSDN問答提供

感謝您的意見,我們儘快改進~
功能建議

我在mac設備上使用localhost上的wordpress主題。 我嘗試了兩個不同的主題,他們在他們的設置中集成了Facebook登錄功能,並且我得到了同樣的錯誤:無法載入URL:此URL的域未包含在應用程序的域中。 為了能夠載入此URL,請將應用的所有域和子域添加到應用設置中的「應用域」欄位。</ code> </ p>

前面提到我已寫過 簡單的AngularJS項目並在localhost上測試了Facebook登錄,它運行良好。 在創建新的App時,我提到 local.foo.com </ code>作為facebook開發者的網站,我在mac上編輯了/ etc / hosts文件並添加了條目: 127.0.0.1 local.foo。 com </ code>使它工作。</ p>

現在,在wordpress主題上嘗試時,我在facebook開發人員上創建了一個新的應用程序,我提到了 local.foo。 com </ code>作為網站(與我在創建工作AngularJs示例時所做的相同)。 我在主題設置中使用了新的App ID,當我嘗試登錄時,我在2個不同的主題上得到了上面提到的錯誤。 我使用了與用於AngularJS App的工作相同的設置。 下圖顯示了Facebook上的設置。</ p>

</ p>

請注意,我嘗試啟用更多選項和 使用 http:// localhost / lovestory 等條目填充 Valid OAuth Redirect URIs </ code>欄位 我在瀏覽器中打開應用程序時出現的內容(例如 http://127.0.0.1:8888/lovestory</ a>),但facebook不再接受帶有http的URI,因為它們只需要https。</ p>
</ div>

網友觀點:
由於網站搬家,部分鏈接失效,如無法下載,請聯繫站長!謝謝支持!
1. 帶 [親測] 說明源碼已經被站長親測過!
2. 下載後的源碼請在24小時內刪除,僅供學慣用途!
3. 分享目的僅供大家學習和交流,請不要用於商業用途!
4. 本站資源售價只是贊助,收取費用僅維持本站的日常運營所需!
5. 本站所有資源來源於站長上傳和網路,如有侵權請郵件聯繫站長!
6. 沒帶 [親測] 代表站長時間緊促,站長會保持每天更新 [親測] 源碼 !
7. 盜版ripro用戶購買ripro美化無擔保,若設置不成功/不生效我們不支持退款!
8. 本站提供的源碼、模板、插件等等其他資源,都不包含技術服務請大家諒解!
9. 如果你也有好源碼或者教程,可以到審核區發布,分享有金幣獎勵和額外收入!
10.如果您購買了某個產品,而我們還沒來得及更新,請聯繫站長或留言催更,謝謝理解 !
GG資源網 » WordPress主題,使用Facebook登錄不在localhost上工作

發表回復

CAPTCHAis initialing...
© 2021-GG資源網 - www.ggplus.cn. All rights reserved