The purpose of this program is to detect fraud on twitter. It does this by targeting a specific companies handle (for example @sprint). It then will read any twitter user that complains to @sprint and begins monitoring for people responding to that tweet that are offering help. If they are not an official supported account then they are marked as fraudulent.
- Twitter API to read tweets @handle
- Nodejs sentiment to determine if tweet is a complaint
- If tweet is a complaint store using MongoDB
- Use Twitter API to search the handle of the people who tweeted @handle
- Match in_reply_to_status_id_str to complaining tweet
- Determine if helpful
- Note: Currently this simply searches through a list of monitored common words. in the future TF-IDF could be used monitoring the official account.
- Verify replying users account
- Store relevant info in MongoDB
- Standard HTML, CSS, and JavaScript front extended
- PassportJS local login method
- Users stored in Nodejs
- Stylized datatables plugin to show tweet info
- In high volume case ass many twitter app keys can be used as are required and will function in a round robin manner.
- Nodejs
- MongoDB
- server/config/authorization.json
{
"url":"mongodb://localhost:27017/DBNAME",
"port":3000,
"debug":false,
"keys":[
{
"CONSUMER_KEY":"",
"CONSUMER_SECRET":"",
"ACCESS_KEY":"",
"ACCESS_SECRET":""
},{
"CONSUMER_KEY":"",
"CONSUMER_SECRET":"",
"ACCESS_KEY":"",
"ACCESS_SECRET":""
}
]
}
cd WORKING_PATH/
node install.js
db.createCollection("tweets")
db.createCollection("statistics")
db.createCollection("users")
db.createCollection("searches")
- Salt to be implemented
{uname:"criggs626",password:"ijhzgdfiuhasdoifjaosifgadsf",email:"example@whatever.com",name:"Caleb Riggs"}
- Required for searching tweets and verifying responses
{name : "Sprint", terms : [ "@sprint", "#sprint" ], verified : [ "sprintcare" ], lastID : [ "0", "0" ] }
- required for monitoring general statistics on the search terms
{name:"Sprint",count:0,negativeCount:0,averageScore:0,averageNegativeScore:0,validRepliesFound:0,fraudulentRepliesFound:0}
To run in the foreground simply navigate to the server and 'node' the index file.
cd WORKING_PATH/fraud/server/
node index.js
For running in the background I recommend forever a node package. Once forever is installed follow same steps as above just 'forever start' instead of 'node'.
cd WORKING_PATH/fraud/server/
forever start index.js