WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Sharebar question (5 posts)

  1. Willem-Siebe
    Member
    Posted 1 year ago #

    Hi,

    I use the share module of Jetpack.
    What I am wondering, how does the Google Share option work even though I have not added the Javascript for this in my page:

    <script type="text/javascript">
      (function() {
        var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
        po.src = 'https://apis.google.com/js/plusone.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
    </script>

    When I want to add a Google+ badge on my page I have to insert this Javascript first before the badge show up. The Google share button needs exactly the same javascript, because this share option from you still work I assumed my Google+ badge showed up as well, but that was not the case. Is your javascript loading at a different location? How do I have to understand this?

    Kind regards,

    Willem

    http://wordpress.org/extend/plugins/jetpack/

  2. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Hello,

    I'm not sure I understand your question, but the code you quote is the official code button code from Google. Can you give me a link to your site, please?

  3. Willem-Siebe
    Member
    Posted 1 year ago #

    Hi Richard,

    The link is:

    http://www.ruzzleonline.nl.

    What I'm confused of, your Google share option from the sharebar is working. So I was thinking in order for your plugin to have Google share working you have added this code somewhere and it is already loaded on my page (because I use sharemodule of Jetpack).

    However, it seems that this is not loaded because I still have to add the code from first post to let the Google+ work.

    I actually thought I can make use of the javascript from the jetpack share module, because that is already installed on my page. Hope you can explain me.

    Kind regards,

    Willem

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    So I was thinking in order for your plugin to have Google share working you have added this code somewhere and it is already loaded on my page (because I use sharemodule of Jetpack)

    That's correct. The library is automatically added to your site, but only if you choose the "Official" button type under Settings > Sharing in your dashboard.

  5. Willem-Siebe
    Member
    Posted 1 year ago #

    Ok, clear to me, will try it! Thanks Jeremy.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.