You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 26, 2020. It is now read-only.
Or include the hosted version on [jsdelivr](http://www.jsdelivr.com/): `//cdn.jsdelivr.net/whatsapp-sharing/1.3.1/whatsapp-button.js`
15
+
Or include the hosted version on [jsdelivr](http://www.jsdelivr.com/): `//cdn.jsdelivr.net/whatsapp-sharing/1.3.2/whatsapp-button.js`
16
16
17
17
### 2. Integrate the buttons source
18
18
@@ -34,18 +34,26 @@ If you want to customize the size, style, url or the sharing text, feel free to
34
34
35
35
Run `WASHAREBTN.crBtn();` after you loaded your content.
36
36
37
-
### 2. I want to track clicks on the button
37
+
### 2. I want to track clicks on the button.
38
38
39
39
You can simply use JavaScript event handlers like `onClick` in the code of step 3.
40
40
41
41
### 3. Can I share photos/videos?
42
42
43
43
Nope, that's not possible (at the moment).
44
44
45
-
### 4. If WhatsApp is not installed on the device there's an error message
45
+
### 4. If WhatsApp is not installed on the device there's an error message.
46
46
47
-
It's not possible to check if WhatsApp is installed on the device. This is a good thing, imagine a webpage can access the list of installed applications.
47
+
It's not possible to check if WhatsApp is installed on the device. This is a good thing, imagine a webpage can access the list of installed applications. And for the record: why should someone try to share something via WhatsApp if he or she is not using WhatsApp at all?
48
48
49
+
### 5. I get "Sharing failed" all the time.
50
+
51
+
The main reason for this error are modifications of the original button code that prevent the library from selecting the buttons. As a result text and url won't be added and the url-scheme that stays empty. Repeat the installation steps and don't change the code on your own.
52
+
You can test that by switching your Browsers useragent to "Android" or "iPhone" and running `WASHAREBTN.buttons` in your JavaScript console after that. This should list all the selected buttons on the page.
53
+
54
+
### 6. But I want my own styling and icons.
55
+
56
+
Well, this library was not made to be heavily modified. It was made to provide an easy way for non-devs to insert a button like this into their websites. If you want your own styling feel free to fork the repo, research the code and build your own button upon it. After all it's only a useragent check and an url-scheme.
0 commit comments