Skip to content

Conversation

bessarabov
Copy link
Contributor

There is a great twitter bot https://twitter.com/cpan_new (here is a source code for this bot https://github.com/punytan/cpan_new )

The cpan_new bot uses metacpan api to find out new releases and creates tweets with the links to that releases on metacpan.

But now its tweets are a bit ugly:

screen shot 2017-03-11 at 17 02 10

This change added author image to the twitter snippet for the release page.

Several examples:

This release page https://metacpan.org/release/ABELTJE/fixedtime-0.05_01 will get:

<meta name="twitter:image" content="https://secure.gravatar.com/avatar/8f05c96f651946263df3a55332b80e64?s=130&amp;d=identicon" />

This release page https://metacpan.org/release/ATHREEF/Glib-FindMinVersion-0.003 will get such header:

<meta name="twitter:image" content="https://avatars2.githubusercontent.com/u/5204368?v=3&amp;s=460" />

Some other example: https://metacpan.org/release/MATTIASH/HTTP-Cache-Transparent-1.3 It gets such header:

<meta name="twitter:image" content="https://secure.gravatar.com/avatar/2683ee4820d55dddb34a9587568b3c1a?s=130&amp;d=identicon" />

Urls in first 2 examples creates correct image. But the third example creates default gravatar image insted of identicon. This is because there is &amp; in url instead of &.

@coveralls
Copy link

coveralls commented Mar 11, 2017

Coverage Status

Coverage remained the same at 69.5% when pulling c4aa077 on bessarabov:meta_twitter_image into fe08a3d on metacpan:master.

@oalders
Copy link
Member

oalders commented Mar 13, 2017

Thanks @bessarabov!

@oalders oalders merged commit 35a1230 into metacpan:master Mar 13, 2017
@bessarabov
Copy link
Contributor Author

Hooray! Now twtitter account https://twitter.com/cpan_new has images in share links:

screen shot 2017-03-13 at 23 21 01

Thank you for merging & releasing =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants