Custom Facebook Share Button without FB-OG Tags

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

When the user clicks the link, Window.open() will open a new window along with the ‘Share’ information.

That is it.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status