970_90

Thursday, 19 March 2015

Disable facebook notification popup after Click on Facebook Like Button

I use following code to show the "Facebook Like Button" in my Web Page.

Added following code in Header
<div id="fb-root"> </div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>

Added Following code where "show the Facebook Like Button"

<div class="fb-like" data-action="like" data-href="http://www.web-technology-experts-notes.in/2011/12/facebook-social-plugin.html" data-layout="standard" data-share="false" data-show-faces="true" style="height: 19px; overflow: hidden;"> </div>


When Someone click on "Facebook Like Button" It shows the following popup.  See Below:
Disable facebook notification popup after Click on Facebook Like Button



Now, I want to disable this facebook popup. Means, If someone click on "Facebook Like Button" I must not show the Popup.

Solution:
Replace the Following code

<div class="fb-like" data-action="like" data-href="http://www.web-technology-experts-notes.in/2011/12/facebook-social-plugin.html" data-layout="standard" data-share="false" data-show-faces="true"> </div> With <div class="fb-like" data-action="like" data-href="http://www.web-technology-experts-notes.in/2011/12/facebook-social-plugin.html" data-layout="standard" data-share="false" data-show-faces="true" style="height: 19px; overflow: hidden;"> </div>

Note: you can increase/decrease the height as per design.

1 comment: