This Facebook share module enables you to share an item by Facebook users. The share dialog can be customized to your own settings. See here an example.
Make sure that the correct script is added to the HTML file, click listener is set on your Facebook share element, and your content has been added to the variables.
- Add the following script to your .html file in the <head> after the other scripts
- Add a click listener function, which should be called when the document is ready. This sets the click to the facebook share dialog, an onclick event on your chosen element. For example:
- Within the facebook.js file you can find the parameters for the FB share dialog. Please fill out each variable (var), between the quotes ('').
Keep in mind, special characters in the description, name, and caption need an HTML Entity, reference.
Note. Do not forget to upload this file (facebook.js) to the Weborama Previewer together with your other files.
See here a example of the Facebook share implementation within an Portrait ad.