NikolayRys / Likely

The social sharing buttons that aren’t shabby
ISC License
394 stars 61 forks source link

Fixes twitter data-title issue #193

Closed vitkarpov closed 4 years ago

vitkarpov commented 4 years ago

Fixes #188

title is being added to the URL if presents (as &title={title}), and Twitter understands title parameter. So, we don't need it once again in the URL's template (as &text={title}).

vitkarpov commented 4 years ago

@NikolayRys I decided to take a look as well. If you've been working on this already, feel free to close. But if not, pls, review. It seems like low-hanging fruit.

NikolayRys commented 4 years ago

Hi, thanks for this PR, but this is a bit simplistic approach to fix it.

First, even though it seems to interpret the title param correctly, the documentation shows only text: https://developer.twitter.com/en/docs/twitter-for-websites/tweet-button/guides/parameter-reference1 Thus, I assume that title is actually deprecated as is not guaranteed to work in future.

Second, it's not the only place where this problem happens, because all of those obligatory params are attached twice.

I'm indeed working on fixing the root cause for this, so shortly I will ask you to review a more complete solution.

vitkarpov commented 4 years ago

@NikolayRys Thanks, it's great that you're working on that. I'd be happy to take a look, that's an interesting issue indeed.