twitter-video
Posts native video to twitter's video API.
Install
npm install twitter-video
Usage
var twitterVideo = var Twit = var oauth = consumer_key: '123' consumer_secret: '123' access_token: '123' access_token_secret: '123' var T = var PATH = '/path/to/video.mp4' twitterVideo var twitterStream = var videoStream = fs twitterStream videoStream
CLI
npm i -g twitter-video
Installing this globally gives you access to the twitter-video
command:
$ twitter-video
Uploads .mp4 video to twitter with a status updates
Usage: twitter-video [options]
--config configure your API keys
--video, -v path to mp4 file e.g. '~/myVideo.mp4' (requires -s)
--status, -s twitter status text e.g. 'this is a tweet yolo' (requires -v)
Before you can post videos to twitter, you need to configure your oAuth keys.
- Visit: https://apps.twitter.com
- Create a new app. This requires that a cell number is added to your twitter account.
- Generate an access token on the "Keys and Access Tokens" tab
Next configure twitter-video
$ twitter-video --config
? Consumer Key 123
? Consumer Secret ***
? Access Token 123
? Access Token Secret ***
Attention: Secret API keys saved to /Users/username/.config/twitter-video
Ready to Send!
Now you can post a tweet with a native video!
$ twitter-video -v DRQCQaiww7XlAYJP.mp4 -s 'engage'
Post created at: https://twitter.com/twittername/status/624602234223865857
Contributing
Contributions welcome! Please read the contributing guidelines first.
Changelog
See CHANGELOG.md for news and updates.