sandeepm Posted November 13, 2015 Share Posted November 13, 2015 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 More sharing options...
justsomeguy Posted November 13, 2015 Share Posted November 13, 2015 Are you saying you're adding that HTML to the page via ajax? Link to comment Share on other sites More sharing options...
thescientist Posted November 14, 2015 Share Posted November 14, 2015 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now