https://github.com/trstringer/trill
:baby_chick: Easily and quickly tweet long and short tweets with flexibility
https://github.com/trstringer/trill
Last synced: 7 months ago
JSON representation
:baby_chick: Easily and quickly tweet long and short tweets with flexibility
- Host: GitHub
- URL: https://github.com/trstringer/trill
- Owner: trstringer
- Created: 2015-10-27T00:20:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-28T01:26:43.000Z (about 10 years ago)
- Last Synced: 2025-06-15T14:21:59.787Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Trill
*Easily and quickly tweet long and short tweets with flexibility*
## Install
```
npm install trill
```
## Usage
```javascript
var trill = require('trill');
var auth = {
consumer_key: 'your_consumer_key',
consumer_secret: 'your_consumer_secret',
access_token_key: 'your_access_token_key',
access_token_secret: 'your_access_token_secret'
};
var tweet = {
text: 'this is my really long tweet that i want the ENTIRE world to read no matter what if you know what i mean and i think you know exactly what i mean every single time',
//
// (optional) allows you to specify
// how the tweet should be prefixed. i.e. if you want
// '{Blog Post}: ' in front of your tweet, the below
// spec will give you that
prefix: {
container: 'curley-brackets', // or 'brackets' for []
text: 'Blog Post',
divider: ': ' // other example... ' - ', ' :: ', etc.
},
//
// (optional)
hashtags: ['javascript', 'node'], // don't need a prefixing '#'
//
// (optional) if you only want a single tweet (truncated if too many
// chars) then either don't defined 'wrap' or set it to
// false. but if you want all of the text to be tweeted
// then set 'wrap' to true and overflow text will be broken
// into multiple tweets
wrap: true
};
trill(auth, tweet, function () {
console.log('finished tweeting your tweet!');
});
```