Sharing an image to facebook

Greetings Everyone!

I have captured a Screenshot at the end of my game which contains score. I have now this image stored in base64. I want to post it on facebook using some share button. Can someone help me out in this matter. Thanking you in anticipation.

Hi @Hassan_Amjad and welcome,

Normally you would share a file hosted on a server but I think a base64 string can work as well. Try doing a google search with “javascript share a base64 to facebook” that brings up a number of tutorials on how to approach this.

Here is the official Facebook guide on how to invoke the Share Dialog:

https://developers.facebook.com/docs/sharing/reference/share-dialog/

1 Like