Loading...

Share Button for Developers

Share Button

The Share button lets people add a personalized message to links before sharing on their timeline, in groups, or to their friends via a mobile app.

If your website doesn't need a button to open share dialog or our website provided button doesn't fit into your website design, Web Share Dialog is also provided for sharing links. Note that you do not need to implement any addition changes on your profile to use this plugin.

Step-by-Step

1. Choose URL or Page

Pick the URL of a website you want to share.

2. Code Configurator

Paste the URL to the Code Configurator, adjust the button size of your share button and put a custom messge to share. Codes are automatically generated.

3. Copy & Paste HTML snippet

Copy and past the snippet into the HTML of the destination website.

Share Button Configurator

NEWSNET Christian Social Network

Copy and past the following code just before the closing <body> tag of your HTML.

<script src='https://www.newsnet.ro/developers-sharebutton/generate.js' ></script>

Copy and past the following code where you want the button to render.

<span data-size='small' data-href='https://www.newsnet.ro/developers-sharebutton' data-title='NEWSNET Christian Social Network' id='ewtnet_222d502616596e527c94c4d6254a857e' >NEWSNET Christian Social Network</span>

Full Code Example

Copy & paste the code example to your website. Adjust the value data-href to your website URL. Next use the data-size to adjust your button size. Finally, use data-title to set your website title or content that should appear on your post update.

Settings

Setting HTML5 Attribute Description Default
href data-href The absolute URL of the page that will be shared. HTML5 versions default to the current page URL.
content data-title Content to be share along with the link. HTML5 versions default to the current page title
size data-size Selects one of the different button sizes that are available for the plugin. Can be either "small", "medium", or "large". small

Share Dialog

The Share dialog gives people the ability to publish an individual story to their timeline, a friend's timeline, a group, or in a private message on Messenger. This does not require our website Login or any extended permissions, so it is the easiest way to enable sharing on the web.

To share a link:

Note: When testing this code, remove the line breaks. Otherwise you will run into an error.

No images added

Advertisement

advertisement







WEB DESIGN and WEB DEVELOPER :
Leontiuc Marius Sebastian -
coder 2012 - 2019

Flag Counter