Facebook offers an easy-to-use Share dialog that you can include on your website so visitors to your site can share your site's pages on their timeline, in groups, or send it to their friends via a Facebook Message. People open the Share dialog by clicking a link on your website, which opens a new window to a special URL on Facebook.
To add the Facebook link to your website, go to the editor of your site and choose one of the two options below:
Add a share link to the specific page you wish your visitors to like
1. Go to the page you wish to add the link to.
2. Click on Add an element> HTML. A generic element will appear.
3. Click on Edit HTML, a 'Raw HTML Settings' box will open.
4. Paste the code below to the box and click OK.
<a href="#"
onclick="
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog',
'width=626,height=436');
return false;">
Share on Facebook
</a>
5. The element will now appear as text "share on Facebook". Move the element to the desired location on the page.
That's it! Make sure to click on PUBLISH to update the live site.
Add a share link to any URL, your domain or an external website
1. Go to the page you wish to add the link to.
2. Click on Add an element> HTML. A generic element will appear.
3. Click on Edit HTML, a 'Raw HTML Settings' box will open.
4. Paste the code below to the box.
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fparse.com" target="_blank">
Share on Facebook
</a>
5. Change the part of the code 'u=https%3A%2F%2Fparse.com' to 'u=yourdomain.com' (here you can add any URL you wish visitors to share)
6. Click OK
5. The element will now appear as text "share on Facebook". Move the element to the desired location on the page.
That's it! Make sure to click on PUBLISH to update the live site.
For more information on the share dialog see https://developers.facebook.com/docs/reference/plugins/share-links/
Comments
0 comments
Article is closed for comments.