Facebook Social Plugin Comments not shown when directly linked to?

冷暖自知 提交于 2019-12-13 01:06:05

问题


I just set up Facebook social plugin comments on my site, but I'm having a little trouble with them. When I get a notification saying that someone commented on something I commented on, if I click on that link I see no comments, but if I reload the page without the ?fb_comment_id=... then I can see the comments.

For instance:

http://www.5crideshare.jessepollak.me/rides/17?fb_comment_id=fbc_10150513336718064_21937866_10150513339773064&ref=notif&notif_t=open_graph_comment#f82002554

shows no comments, but

http://www.5crideshare.jessepollak.me/rides/17

shows comments.

Any ideas on what might be causing this?

Thank you very much,

Jesse


回答1:


Because Facebook supposes that they are two different pages. While you are adding the plugin to your page, pay attention to data-href value. Make your data-href value constant for the same page, although it may be requested with different URLs with extra querystrings.

When I look at your page source, clicked from notification:

<div class='fb-comments' data-href='http://www.5crideshare.jessepollak.me/rides/17?fb_comment_id=fbc_10150513336718064_21937866_10150513339773064&amp;ref=notif&amp;notif_t=open_graph_comment' data-num='{:posts=&gt;2}' data-width='500'></div>
</div>

On this page, data-href value should be without unnecessary querystrings. It should be like this same with clear one: http://www.5crideshare.jessepollak.me/rides/17



来源:https://stackoverflow.com/questions/8452529/facebook-social-plugin-comments-not-shown-when-directly-linked-to

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