Facebook 按鈕造成 the Domain of This URL Isn't Included in the App's Domains... 錯誤 如:讚(like)、分享(share)、登入(login)...等

最近發現網頁出現錯誤訊息:

無法載入網址: 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.

檢查後發現是 facebook 按鈕造成的,

查了相關資料應該是要將網頁與 facebook 的開發管理網站連結,

其實不做的話按鈕還是可以正常使用,只是夏天有潔癖看了不開心 XDD

首先登入 Facebook 開發者網站

接著新增一個應用程式,在左邊選單點選設定選項,

在右邊畫面下方可以找到+新增平台按鈕,點下後選取網頁類型並輸入網站網址,

完成後按下立即開始,將程式碼加入網頁中的 body 區塊即可。

Comments