I am using this script for sharing options.This works well on single.php .
Problem is on home page ,where i have 10 posts..For each post there is a sharing button.
But when user clicks on any post to share, then only the last post in the loop gets shared
<script>
function facebook()
{
window.open("http://facebook.com/sharer.php?app_id=1433580610197489&sdk=joey&u=<?php the_permalink(); ?>","_blank","toolbar=no, scrollbars=no, resizable=yes, top=500, left=500, width=650, height=540");
}
function google()
{
window.open("https://plus.google.com/share?url=<?php the_permalink(); ?>","_blank","toolbar=no, scrollbars=no, resizable=yes, top=500, left=500, width=650, height=540");
}
function twitter()
{
window.open("http://twitter.com/home?status=<?php the_permalink(); ?>","_blank","toolbar=no, scrollbars=no, resizable=yes, top=500, left=500, width=650, height=540");
}
</script>
<a title="Facebook" onclick="facebook()" ><i class="fa fa-facebook"></i></a>
<a title="Twitter" onclick="twitter()" ><i class="fa fa-twitter"></i></a>
<a title="Google+" onclick="google()" ><i class="fa fa-google-plus"></i></a>
do i understand right, that you have something like this:
if so you override the facebook() function every time.
Try something like this: