jcadima
4/28/2017 - 3:30 PM

Facebook Sharer URL with parameters

Facebook Sharer URL with parameters

http://stackoverflow.com/questions/20956229/has-facebook-sharer-php-changed-to-no-longer-accept-detailed-parameters

URL (of course) → u
custom image → picture
custom title → title
custom quote → quote
custom description → description

example:

https://www.facebook.com/sharer/sharer.php?u=<?php echo get_the_permalink(); ?>&description=<?php echo strip_tags( get_field('description') ) ;  ?>


	<ul class="social-list">
	   <li class="box"><a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo get_the_permalink(); ?>&description=<?php echo strip_tags( get_field('description') ) ;  ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><i class="fa fa-facebook"></i></a></li>
	   <li class="box"><a href="https://twitter.com/intent/tweet?text=<?php echo get_the_title(); ?>&url=<?php echo get_the_permalink(); ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><i class="fa fa-twitter"></i></a></li>
	   <li class="box"><a href="https://www.linkedin.com/cws/share?url=<?php echo get_the_permalink(); ?>" onclick="javascript:void window.open(this.href,'','width=600,height=300,resizable=true,left=200px,top=200px');return false;"><i class="fa fa-linkedin"></i></a></li>

	   
	</ul>