Closed fwenzel closed 12 years ago
Possible that this is not supported unless you use OpenGraph tags. In that case, you can wontfix this bug.
I need to implement OpenGraph tag data stripping for the twitters.
I accidentally all of the twitters.
It would be good if we could pass a specific URL into the sharing widget, rather than simply sharing the current page. On a blog, for example, there could be multiple instances of the sharing widget on a single page. and each one should share the permalink for an individual post. There are other cases where one might want to share a URL that isn't necessarily the URL of the current page.
My first thought is that we could add another attribute to the widget instance, like data-url="foo". And if that attribute is missing or empty, look for an og:url meta element in the document to share the current page. And if THAT is missing, maybe even fall back to the location.href, which could make sharing still sort of work even if the page doesn't have OpenGraph metadata.
This has actually been implemented - instead of having a data-url I'm stripping content from the open graph tags and passing that to twitter. I think this will be easier than asking developers to put the information in two places.
I agree
Sharing the current URL is an obvious choice for most cases. However, sometimes we might want to specifically define the share URL (to include a tracking code, for example). Bonus points for being able to specify the URL per service (twitter, fb, g+).