badge-generator icon indicating copy to clipboard operation
badge-generator copied to clipboard

Add tweet badge flow

Open MichaelCurrin opened this issue 5 years ago • 8 comments

Use my Twitter guide docs

MichaelCurrin avatar Aug 10 '20 22:08 MichaelCurrin

Tweet

MichaelCurrin avatar Aug 12 '20 08:08 MichaelCurrin

Split for readability

[![Tweet](
https://img.shields.io/twitter/url?
  style=social&
  url=https%3A%2F%2Fmichaelcurrin.github.io%2Fpython-twitter-guide%2F)]
(https://twitter.com/intent/tweet?
  url=https%3A%2F%2FMichaelCurrin.github.io%2Fpython-twitter-guide%2F
  &hashtags=twitter-api,tweepy,python,guide,tutorial)

MichaelCurrin avatar Aug 12 '20 08:08 MichaelCurrin

Alternatives. Focusing on link target not the badge

tweet

https://twitter.com/intent/tweet?
  &text=Normalize.css%3A%20a%20modern%20HTML5-ready%20alternative%20to%20CSS%20resets
  &tw_p=tweetbutton
  &url=https%3A%2F%2Fnecolas.github.io%2Fnormalize.css%2F

Tweet

<a class="twitter-share-button" href="https://twitter.com/share" data-count="none" data-size="large" data-text="Normalize.css: a modern HTML5-ready alternative to CSS resets">Tweet</a>

Clicked here on issues, it uses the current URL.

Need to login to Twitter to see if text gets passed

https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2FMichaelCurrin%2Fbadge-generator%2Fissues%2F36

MichaelCurrin avatar Sep 21 '20 13:09 MichaelCurrin

See also existing tool for generating Tweets based on URL, title, description, image URL

https://www.sociallinkgenerator.com/#generator

e.g. from generator above. Title and description are together

https://twitter.com/intent/tweet?
  url=https%3A%2F%2Fgithub.com%2FMichaelCurrin&amp;
  text=MichaelCurrin%20on%20GitHub%3A%20My%20description

https://tech.cymi.org/tweet-intents

MichaelCurrin avatar Mar 03 '21 06:03 MichaelCurrin

Documentation with example values

https://developer.twitter.com/en/docs/twitter-for-websites/tweet-button/guides/web-intent

MichaelCurrin avatar Mar 03 '21 07:03 MichaelCurrin

Related https://publish.twitter.com/# https://help.twitter.com/en/using-twitter/twitter-buttons https://help.twitter.com/en/using-twitter/add-twitter-share-button

MichaelCurrin avatar Mar 03 '21 07:03 MichaelCurrin

Follow button docs https://developer.twitter.com/en/docs/twitter-for-websites/follow-button/overview

MichaelCurrin avatar Mar 03 '21 07:03 MichaelCurrin

Example

  • URL: https://michaelcurrin.github.io/badge-generator/
  • Title: Badge Generator
  • Description: Magically generate custom badges that you can paste in your docs
  • Hashtags: vue github documentation readme code

Using https://www.sociallinkgenerator.com was broken because it escaped & when not needed.

Result

https://twitter.com/intent/tweet?url=https%3A%2F%2Fmichaelcurrin.github.io%2Fbadge-generator%2F&text=Badge%20Generator%3A%20Magically%20generate%20custom%20badges%20that%20you%20can%20paste%20in%20your%20docs&hashtags=vue,github,documentation,readme,code

As Tweet text

Badge Generator: Magically generate custom badges that you can paste in your docs https://michaelcurrin.github.io/badge-generator/ #vue #github #documentation #readme #code

MichaelCurrin avatar Apr 13 '21 08:04 MichaelCurrin