簡體   English   中英

Facebook Like 按鈕在 localhost 上工作,但在 Django 上的生產中不工作

[英]Facebook Like button working on localhost but not on production on Django

我正在使用 XFBML 在 Django 應用程序上為我的 Post 對象顯示 Like 按鈕。 在 localhost 上,Like 按鈕可以正常工作。 它可以將我喜歡的內容發布到我的 FB 個人資料中。 但是在生產中,當我單擊“贊”按鈕時,它會短暫顯示數字1 ,然后數字就會消失。 Chrome 開發工具中沒有錯誤。

你可以在這里看到它的生產

謝謝!

看來您的應用程序配置不正確。 這是我在點擊並查看網絡流量時在 firebug 中得到的答案:

for (;;);{"__ar":1,"payload":{"requires_login":false,"success":false,"already_connected":false,"is_admin":false,"show_error":true,"error_info":{"brief":"App ID does not match domain","full":"The app ID specified within the \"fb:app_id\" meta tag is not allowed on this domain. You must setup the Connect Base Domains for your app to be a prefix of http:\/\/www.matilah.com\/20\/."}}}

有趣的部分是

Brief : App ID 與域不匹配

full :此域不允許使用“fb:app_id”元標記中指定的應用 ID。 您必須將應用程序的 Connect Base Domains 設置為前綴http://www.matilah.com/20/

您在http://www.facebook.com/developers/的應用程序設置中輸入了什么

尤其是Web Site > Site URLWeb Site > Site Domain

應該是http://www.matilah.commatilah.com

暫無
暫無

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

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