This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified readme, updated test.html to use the current button-path
- Loading branch information
kriskbx
committed
Sep 16, 2014
1 parent
319f4bd
commit 0b9eb35
Showing
2 changed files
with
11 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
# WhatsApp sharing button | ||
|
||
This is the buttons source code of this awesome webservice: http://whatsapp-sharing.com | ||
## Installation | ||
|
||
### Get started | ||
### 1. Download | ||
|
||
`git clone https://github.com/kriskbx/whatsapp-sharing.git whatsapp-sharing` | ||
Download the current [release](https://github.com/kriskbx/whatsapp-sharing/releases) or clone the repo and upload `dist/whatsapp-button.js` somewhere on your webserver. | ||
|
||
`cd whatsapp-sharing` | ||
### 2. Integrate the buttons source | ||
|
||
`npm install` | ||
Use this code right before the `</body>`, replace `http://your-domain.tld/path/whatsapp-button.js` with the url to the just uploaded file. | ||
|
||
### Build the button | ||
<script type="text/javascript"> if(typeof wabtn4fg==="undefined") {wabtn4fg=1;h=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript";s.src="http://your-domain.tld/path/whatsapp-button.js";h.appendChild(s)}</script> | ||
|
||
Just run `grunt` and look into "dist". | ||
### 3. Place it on your website | ||
|
||
### Use the button | ||
|
||
If you want to use the button yourself, just use this code: | ||
Place this code somewhere on your website to display the button: | ||
|
||
<a href="whatsapp://send" data-text="Take a look at this awesome website:" data-href="" class="wa_btn wa_btn_s" style="display:none">Share</a> | ||
|
||
and | ||
|
||
<script type="text/javascript"> if(typeof wabtn4fg==="undefined") {wabtn4fg=1;h=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript";s.src="http://your-domain.tld/path/button";h.appendChild(s)}</script> | ||
|
||
If you want to customize the size, style, url or the sharing text, feel free to visit [whatsapp-sharing.com](http://www.whatsapp-sharing.com) for a code generator. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters