Jump to content

sandeepm

Recommended Posts

I am working with facebook share button in view file and ajax files,
but facebook share button not working in ajax page but it's working in when page load time this is my code,

 

<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_GB/sdk.js#xfbml=1&version=v2.5";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-share-button" data-href="/useradmins/details/<?php echo $param ?>/<?php echo $inst_name.'-'.$institute_id ?>" data-layout="button_count"></div>



can you please help me?

Link to comment
Share on other sites

Where is your AJAX code? Googling for this question turned up many stackoverflow posts. Did you try looking at some of those answers?

http://stackoverflow.com/questions/8961567/render-like-button-after-ajax-call

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...