source/plugins/tweets/README.md
</td>
<b>default:</b> no
</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_tweets_token</code></h4></td> <td rowspan="2"><p>Twitter API token</p> </td> </tr> <tr> <td nowrap="nowrap">🔐 Token<b>type:</b> <code>token</code>
</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_tweets_user</code></h4></td> <td rowspan="2"><p>Twitter username</p> </td> </tr> <tr> <td nowrap="nowrap">⏯️ Cannot be preset<b>type:</b> <code>string</code>
<b>default:</b> <code>→ User attached twitter</code>
</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_tweets_attachments</code></h4></td> <td rowspan="2"><p>Tweets attachments</p> <p>Can be used to display linked images, video thumbnails, etc.</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>boolean</code><b>default:</b> no
</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_tweets_limit</code></h4></td> <td rowspan="2"><p>Display limit</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(1 ≤ 𝑥 ≤ 10)</i><b>default:</b> 2
</td> </tr> </table> <!--/options-->To get a Twitter token, it is required to apply to the developer program. It's a bit tedious, but requests seems to be approved quite quickly.
Create an app from the developer dashboard and register your bearer token in repository secrets.
name: Latest tweets
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.tweets.svg
token: NOT_NEEDED
base: ""
plugin_tweets: yes
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
plugin_tweets_user: github
name: Latest tweets including attachments
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.tweets.attachments.svg
token: NOT_NEEDED
base: ""
plugin_tweets: yes
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
plugin_tweets_attachments: yes
plugin_tweets_user: github
plugin_tweets_limit: 1