Facebook Like Button XFBML comment not working

荒凉一梦 提交于 2020-01-03 03:01:13

问题


Update: Read the comments to the item marked as the answer below for the full answer.

I am implementing a Like button from Facebook per this document: http://developers.facebook.com/docs/reference/plugins/like

I am using the XFBML version so that users can add comments when they click on the Like button. I have imported the Facebook JavaScript SDK an am using a valid App ID. The button appears and I am able to "Like" the page, but I am never prompted for comments.

Is anybody else running into these issues? Anybody know of a fix?


回答1:


Before I had inserted the correct appId in the FB.init() call to initialize the Facebook javascript SDK, the button appeared, I was able to "Like" the page like you, but saw no comment box either.

When I inserted the appId, but hosted the page locally, I got an error message saying that the page could not be reached (from Facebook's servers).

Finally, hosting the page on a public server made the buttons behave as expected: with comment box for the XFBML version, and without comment box for the Iframe.

Hope that helps...




回答2:


add this style and the comment box will be hidden after you click like.

.fb_edge_widget_with_comment span.fb_edge_comment_widget iframe.fb_ltr {
      display: none !important;
}



回答3:


retailevovled is right. I've just found this tutorial which is a bit more detailed (German, but you can use Google Translate): http://www.be24.at/blog/entry/639312




回答4:


Create an app for this specific implementation, then it will work: http://developers.facebook.com/setup/

(I too first used an 'old' app-id with the same problems you described.)



来源:https://stackoverflow.com/questions/2688836/facebook-like-button-xfbml-comment-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!