kriskbx / whatsapp-sharing

whatsapp sharing button + generator

Home Page:http://kriskbx.github.io/whatsapp-sharing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whatsapp Sharing Failed! Please try again

bonirulzz opened this issue · comments

Hi Authors,

Thanks a ton for the script.

I've implemented the script and followed the installation steps mentioned by you. Additionally, I've reviewed the FAQ.

I am unable to find a solution, hence reaching out to you.

Link -http://m.flickstime.com/Ahmedabad/movie-shows-in-theater-details/mvid/557/movie/Ek-Paheli-Leela-

I've installed the button in the link mentioned above. When i try to click the button it shows - sharing failed. Try after some time! I am not sure what's the issue? Can you help?

Thanks a ton in advance
Boni

commented

The crBtn() method doesn't run in your example. So the a tag isn't replaced with an iframe and the data attributes are not added to the url scheme. I guess the code doesn't fire because of the massive amount of js-errors on your page. (Check the console, I've counted 71 on Firefox)
As a hotfix you can try to run theWaShBtn.crBtn(); after the page is loaded, but you should probably fix all the other errors.

facing same issue .......... in this regards could you please help me

commented

Noone can help you without code to look at.
Read this first: https://github.com/kriskbx/whatsapp-sharing/blob/master/ISSUES.md

I also get this issue.
No console errors, if I type WASHAREBTN in console, it seems to be working

From my PC I get:

WASHAREBTN {isIos: false, cntLdd: function, addStyling: function, setButtonAttributes: function, setIframeAttributes: function…}

However, when I click on the whatsapp sharing icon on mobile, on Android I get a sharing failed message, while on iOs it opens Whatsapp, I select a recipient, but no link is shared.

Here is my code snippets
https://gist.github.com/akmur/8b2d4218c99f9b40d06b

commented

Well, @akmur you removed all the css-classes and applied your own... The original classes are needed for the JavaScript part to select the button elements. This is the original code you've got to use: <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>
You also removed style="display:none" which ensures that the button won't be displayed by default. On a device that supports WhatsApp the JavaScript will display it again.

As I said here - and this is important though - the library was not made for heavy modifications. If you want to use your own styling feel free to research/fork/clone the code and build your own button upon it.

Many thanks for your reply, I thought classes were just for styling purpose it seems to work now