开发者

facebook comment plugin: remove like button

开发者 https://www.devze.com 2023-01-18 11:39 出处:网络
The FB: comment plugin comes with both a like button and comment box.Does anyone out there know h开发者_开发百科ow to remove the like button from the facebook comment plugin?I got it working:

The FB: comment plugin comes with both a like button and comment box. Does anyone out there know h开发者_开发百科ow to remove the like button from the facebook comment plugin?


I got it working:

To remove (hide) the like-button that comes above the comments-box To hide the Like botton, you will need to add 2 attributes and create a CSS file. 1. simple="1" 2. css="http://yoursitedomainname.com/fb_comments.css"

<fb:comments expr:title='data:post.title'

expr:url='data:post.url' expr:xid='data:post.id' simple='1' css='http://yoursitedomainname.com/fb_comments.css'/>

in the css file add this style code:

div.like, div.like div {display:none;}

If you want you can just link to my hide CSS file: http://www.fileden.com/files/2006/10/3/258652/hidelike.css

Thanks to Gil Goldshlager, original post @ forum.developers.facebook.net/viewtopic.php?id=58903


I've also searched for this answer but found nothing. I guess it's not possible for the moment. But if someone knows anything about this, I would also like to hear about it!


The answer from mctaco/Gil Goldshlager did not work for me. i assume, they only work with the old comments plugin. But i tried around with the tags and this one was working for me, to remove the like button:

<div class="fb-comments" data-href="{{ request.build_absolute_uri }}"></div>

This code comes from django. if you are using another server side language, then you have to replace {{ request.build_absolute_uri }} with the absolute uri from the page, where you want to have the comments plugin installed.

If you omit the data-href attribute, the like button is displayed.

0

精彩评论

暂无评论...
验证码 换一张
取 消