Generate actionable leads from Twitter in real-time.
There are many people out there literally asking you to introduce your product to them so they can become your customers, but the problem is that it's very difficult to find them!
Tweelead will help you find those people easily - It gets the Tweets matching the keywords that are important to you from the Twitter Stream API, sends them to AYLIEN (free account required) for sentiment analysis, and depending on your preference, puts the positive (or negative) tweets in a spreadsheet on your Google Drive.
You can read more about Tweelead here: http://blog.taskulu.com/post/how-get-actionable-leads-twitter-real-time
Setting Tweelead up is very easy and can be done in a few minutes:
1) Download the code from Github:
wget https://github.com/Taskulu/tweelead/archive/master.zip -O tweelead-master.zip
unzip tweelead-master.zip
or
git clone https://github.com/Taskulu/tweelead.git
2) Create a Twitter Application. Go to the “Keys and Access Tokens” tab, and generate a new access token (there will be a button towards the bottom).
3) Register an account with AYLIEN and generate the free application ID and Key.
4) If you're using 2 Factor Authentication with your Google account, create an app specific password for Tweelead here.
5) Copy this spreadsheet to your Google Drive. We'll need the spreadsheet key from the URL later.
URL format: https://docs.google.com/spreadsheets/d/{SPREADSHEET-KEY}/edit
6) Rename config.ini.example to config.ini and set the values:
GOOGLE_EMAIL = [email protected]
GOOGLE_PASSWORD = YOUR-PASSWORD123!#
GOOGLE_SPREADSHEET = GOOGLE-SPREADSHEET-KEY
AYLIEN_APP_ID = YOUR-AYLIEN-APPLICATION-ID
AYLIEN_APP_KEY = YOUR-AYLIEN-APPLICATION-KEY
TW_CONSUMER_KEY = TWITTER-CONSUMER-KEY
TW_CONSUMER_SEC = TWITTER-CONSUMER-SECRET
TW_ACCESS_TOKEN_KEY = TWITTER-ACCESS-TOKEN-KEY
TW_ACCESS_TOKEN_SEC = TWITTER-ACCESS-TOKEN-SECRET
CSV_KEYWORDS = comma,separated,list,of,your,keywords
LANGUAGE = en
7) What kind of tweets are you looking for? Configure the POLARITY_OPTIONS in index.js
// Confidence level is always between 0.5 and 1, therefore in the example below
// setting the positive confidence level to 0.49 instead of 0 does not make any
// difference in the results that are put in the spreadsheet.
const POLARITY_OPTIONS = {
// Do not show any positive tweets.
positive: 0,
// Show all the negative tweets.
negative: 1,
// Show neutral tweets with at most 65% confidence.
neutral: 0.65
};
8) Open up your terminal and start finding Tweeleads!
cd /path/to/tweelead
npm install
node index
I've configured the code to accept any negetavie tweet and neutral tweets with less than 65% confidence level and send those tweets to the Google Spreadsheet. This needs to be changed/tuned for your use case. To change it open index.js and find and edit this part:
if (error === null && (response.polarity == 'negative' || (response.polarity == 'neutral' && response.polarity_confidence <= 0.65))) {