• I’ve used data-a2a-url to specify the sharing URL in the code below.

    And it works fine – except for whatsapp. Do you know what could be the problem?
    Seems like whatsapp share button don’t listen to data-a2a-url

    This is my (simplified) code:

    <div class="a2a_kit a2a_kit_size_35 addtoany_list" data-a2a-url="www.test.com">
                <a class="a2a_button_email share-elements-item"></a>
                <a class="a2a_button_twitter share-elements-item"></a>
                <a class="a2a_button_whatsapp share-elements-item"></a>
            </div>

    Thanks,
    Damir

    • This topic was modified 5 years, 9 months ago by Damir Tahiri.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Damir Tahiri

    (@tahireu)

    Now I noticed whatsapp button don’t listen to data-a2a-url only on first button click, and after that it works.

    • This reply was modified 5 years, 9 months ago by Damir Tahiri.
    • This reply was modified 5 years, 9 months ago by Damir Tahiri.
    • This reply was modified 5 years, 9 months ago by Damir Tahiri.
    Thread Starter Damir Tahiri

    (@tahireu)

    Update – seems like whatsup in not completely compatible with the AddToAny. I believe this issue is also related to this.

    Also, I figured out that in Chrome it’s loading the sharing URL from the data-a2a-url only if whatsapp sharing button has already been clicked at least once before. (first time it will just load URL from the URL bar)

    Plugin Author micropat

    (@micropat)

    How is WhatsApp not working for you exactly?

    What’s the URL of a page you’re using the code on?

    A minimal test case works as expected:
    https://codepen.io/anon/pen/bzKzwr?editors=1000

    If that test case doesn’t work for you, it’s likely that some browser extension you have installed is interfering.

    Also, I figured out that in Chrome it’s loading the sharing URL from the data-a2a-url only if whatsapp sharing button has already been clicked at least once before. (first time it will just load URL from the URL bar)

    That usually means some other script on the page is interfering with your links. Try temporarily deactivating plugins and switching to a default theme to find the root cause.

    Thread Starter Damir Tahiri

    (@tahireu)

    Hello @micropat ,

    Firefox issue is not related to my browser – You can try to test your codepen snippet on browserstack.com Firefox. I also shared a link for the few months old threat on this forum related to this issue in my previous comment.

    For the Chrome – I added simplified HTML in my first comment, which was not a good idea. Actual code is different, and it’s causing the issue:

    <div class="a2a_kit a2a_kit_size_35 addtoany_list" data-a2a-url="www.test.com">
                <a class="a2a_button_email share-elements-item"></a>
                <a class="a2a_button_twitter share-elements-item"></a>
                <a href="#" class="share_zone_activator">Open Dropdown</a>
                <div class="share_zone_dropdown" style="display: none;">
                     <div class="single-share-dropdown-item hide-desktop">
    			<a class="a2a_button_whatsapp"></a>
                     </div>
                </div>											
    </div>

    I double-nested the a2a_button_whatsapp, and seems like that is causing the issue. If I change it to something like this, it works on Chrome:

    • This reply was modified 5 years, 9 months ago by Damir Tahiri.
    • This reply was modified 5 years, 9 months ago by Damir Tahiri.
    • This reply was modified 5 years, 9 months ago by Damir Tahiri.
    Thread Starter Damir Tahiri

    (@tahireu)

    <div class="share_zone_dropdown" style="display: none;">
         <a class="a2a_button_whatsapp single-share-dropdown-item hide-desktop"></a>
    </div>	
    Thread Starter Damir Tahiri

    (@tahireu)

    P.S. Firefox issue is also happening on Safari, while in Opera it works but it gives a “unknown protocol” warning.

    Plugin Author micropat

    (@micropat)

    It’s up to WhatsApp to register its whatsapp:// protocol for your browser(s) to handle it. Contact WhatsApp for support:
    https://www.whatsapp.com/contact/?subject=messenger

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Whatsapp sharing button don’t listed to data-a2a-url’ is closed to new replies.