Last updated on July 7, 2017
Nowadays you can find Facebook “Like” and “Recommend” widgets on every website. One problem I have always found with sharing URLs on Facebook is that you often have no control over the image and description text that accompany the URL. I would like to share the solution to the problem.
Below are the details that I would like to share on Facebook wall, whenever user clicks on the share button. However you can change this values using different methods as for your requirements.
You can control sharing text, image and description with Facebook Open Graph also, but I am not going to use it here.
If you want to use FB Open graph API, please read – Facebook Open Graph META Tags
PHP Code
HTML
Share on facebook wall!
When the user clicks the link, Window.open() will open a new window along with the ‘Share’ information.
That is it.