2

I have created a button in my website that will share the page. But on clicking the link Facebook is showing "file not found". Facebook debugger in showing no problem

URL i want to shar: http://www.huzup.com/subcategory.php?subcategory=Mollywood&highlight=www.mohanlal.com

Link on the button to share: http://www.facebook.com/sharer.php?u=http://www.huzup.com/subcategory.php?subcategory=Mollywood&highlight=www.mohanlal.com

Gijo Varghese
  • 11,264
  • 22
  • 73
  • 122
  • you could refer to this posts may help : [1]: http://stackoverflow.com/questions/9120539/facebook-share-link-no-javascript – Eslam Soliman Apr 21 '14 at 07:57

1 Answers1

1

Here it is:

<?php
echo '<a href="http://www.facebook.com/sharer.php?u='.urlencode('http://www.huzup.com/subcategory.php?subcategory=Mollywood&highlight=www.mohanlal.com').'">share on Facebook</a>';
?>
dystopiandev
  • 134
  • 1
  • 6
  • urlencode replaces special characters in the url like :// and & etc to characters that the browser can understand. http://php.net/manual/en/function.urlencode.php – skrln Sep 10 '14 at 09:53