api - Facebook Share button - To share the page contents instead of page URL -


i using facebook share button. works fine code

<a href="https://www.facebook.com/sharer/sharer.php?u=www.sample.com" target="_blank">   share on facebook </a></li>. 

but code sharing page url alone. need share images , email exists on sharing page. how ?. can me ?

<a onclick="fb('www.google.com','abcd')" href="javascript:void(0);"><img src="<?php echo website_img_url; ?>fb.jpg" width="34" height="34"  alt=""/></a>   (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";       fjs.parentnode.insertbefore(js, fjs);     }(document, 'script', 'facebook-jssdk')); function fb(url,title) { var currenturl    =    encodeuricomponent(url); window.open("https://www.facebook.com/sharer.php?u="+currenturl,"","height=368,width=600,left=100,top=100,menubar=0");  } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -