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 that will open a facebook share dialog. For example:
<div id="yourElement" onclick="createURL()"></div>
- 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.
Please sign in to leave a comment.