andresmayorca / static-tweet

Home Page:https://static-tweet.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Static Tweet

Completely customizable static tweet for Next.js applications.

Demo

https://static-tweet.vercel.app/1238918791947522049

How to use

To have a working copy of this project, run the following command:

npx create-next-app static-tweet --example https://github.com/lfades/static-tweet/tree/main
# or
yarn create next-app static-tweet --example https://github.com/lfades/static-tweet/tree/main

To have full access to all Twitter elements, like videos and polls, you'll need a Twitter API Token, once you have it, copy the .env.local.example file in the root directory to .env.local (which will be ignored by Git):

cp .env.local.example .env.local

Then add your API token to .env.local, it should look like this:

TWITTER_API_TOKEN=...

For polls, make sure that you have Tweets and Users from Twitter Labs enabled for your app. It's required to get access to polls metadata.

Add Static Tweets to Your App

Currently, there's no package to do this, however you're welcome to copy the files and add it to your project!

For an example, take a look at the following blog: rauchg/blog

About

https://static-tweet.vercel.app

License:MIT License


Languages

Language:JavaScript 76.4%Language:CSS 23.4%Language:Shell 0.2%