Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prosellen/nextjs-demo-twitter
https://github.com/prosellen/nextjs-demo-twitter
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/prosellen/nextjs-demo-twitter
- Owner: prosellen
- License: mit
- Created: 2021-11-21T17:12:03.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-21T17:15:43.000Z (about 3 years ago)
- Last Synced: 2024-11-09T09:51:49.111Z (2 months ago)
- Language: JavaScript
- Homepage: nextjs-demo-twitter.vercel.app
- Size: 221 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# Static Tweet
Completely customizable static tweet for Next.js applications.
## Demo
https://static-tweet.now.sh/1238918791947522049
## How to use
To have a working copy of this project, run the following command:
```bash
yarn create next-app static-tweet --example https://github.com/lfades/static-tweet/tree/master
```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`](.env.local.example) file in the root directory to `.env.local` (which will be ignored by Git):
```bash
cp .env.local.example .env.local
```Then add your API token to `.env.local`, it should look like this:
```bash
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](https://github.com/rauchg/blog/blob/master/pages/2020/2019-in-review.js)