This microserivce will handel post segment of messages contaion links, hanshtags and messages to tweeter and keep message length equal or less than 140 characters. You can add as many as you like hashtages and links and this service will manage segment messages and post them.
*You should have account on Twitter Developer, to get your secret and tokens to start using this service
Check out the express interface for this microservice
npm install twitter-service
let tw = require('twitter-service');
tw({
"twitter":{
"consumer_key" :"ENTER YOUR CONSUMER KEY",
"consumer_secret" :"ENTER YOUR CONSUMER SECRET",
"access_token" :"ENTER YOUR ACCESS TOKEN",
"access_token_secret":"ENTER YOUR ACCESS TOKEN SECRET"
},
"links" :['https://github.com/aliaburas80/twitter_microservice'],
"hashtags":"#github#photooftheday#photooftheday#beautiful#fashion#instagood",
"message" :"Hello!"
});
-
Open index.js and change urls array.
-
open service/twitter/twitterManager.js, and change promise message tweetsMessages(twit,links,hashtags,' Amazing! ')
-
open twitter_config/hashtages.js, do your magic.