How to create a custom post to share on facebook?

Hi guys!

I wanted to allow users to share a custom message (pre-typed) and URL (added by the user) - and when the share option is clicked, it automatically opens the Facebook post option that shows the pre-typed message along with the URL.

It also shows the number of shared done for that post.

Update:

On some research, I found this share button option by Facebook itself. It solves the URL part (wherein I can include the input URL option instead of the one given in the code) and shares count for me.

But how do I change this code to also include custom message text?

this is the code:

Share

This topic was automatically closed after 70 days. New replies are no longer allowed.