question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dynamic share url support

See original GitHub issue

Thanks for great plugin, I have a list of thumbnails and all have the jsSocials attached to them, but I want to make the url of individual thumbnail not the hole page url. Here is my html it has a data-url which i wanted to use as share link.

     <div class="sharing" data-url="http://localhost:8000/post/167">
          <img ... />
     </div>

     <div class="sharing" data-url="http://localhost:8000/post/147">
          <img ... />
     </div>

I have initialise plugin like this

    $(".sharing").jsSocials({
        url : $(this).data('url'),
        showLabel : false,
        shares: ["facebook", "twitter", "pinterest", "googleplus"]
    });

Please help how can I do it.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tyidnetcommented, Mar 7, 2019

I am using version 1.4.

When I try to change share url to a variable, the buttons are no longer showing up. It only works when I use like this - url: “http://url.to.share”,

I tried the sample code you showed above, same issue.

Any ideas?

thanks!

1reaction
tabalinascommented, Jul 19, 2015

Thank you for the feedback!

Try this code:

$(".sharing").each(function() {
    $(this).jsSocials({
        url : $(this).data('url'),
        showLabel : false,
        shares: ["facebook", "twitter", "pinterest", "googleplus"]
    });
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic URL with ShareThis - Stack Overflow
I would like to allow users to share each picture separately. This is my html: <div class="sharethis-inline-share-buttons" data-url="http:// ...
Read more >
Manually constructing a Dynamic Link URL - Firebase
You can create a Dynamic Link by manually constructing a URL with the ... send users to the most appropriate destination when they...
Read more >
Dynamic URLs vs. static URLs | Google Search Central Blog
What is a dynamic URL? Should I try to make my dynamic URLs look static? Which can Googlebot read better, static or dynamic...
Read more >
Dynamic URL Issue | WordPress.org
Dynamic URL Issue. sous.studio. (@sousstudio) ... I scroll to next post, but URLs for sharing remain for the first one. ... Plugin Author...
Read more >
Create a Dynamic Link - Firebase Help - Google Support
Dynamic Links are deep links into an app that work whether or not users have installed the app yet. When users open a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found