Skip to content

Commit

Permalink
Fix mention
Browse files Browse the repository at this point in the history
  • Loading branch information
maktak1995 committed Feb 22, 2017
1 parent dc5c40d commit a204a03
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,37 @@ function twitteraouth () {
twitteroauthwindow.close();
});

client = new tw_client({
consumer_key: '74Ww7f88pRHLkmXYSKbqxO1xI',
consumer_secret: 'f6tpMmCwxYXtl7Qn6eMWXVviOHOQLHVp1pdivIhQ4pNw6SalPr',
access_token_key: twitter_accessToken,
access_token_secret: twitter_accessTokenSecret,
});
client = tw_client({
consumer_key: '74Ww7f88pRHLkmXYSKbqxO1xI',
consumer_secret: 'f6tpMmCwxYXtl7Qn6eMWXVviOHOQLHVp1pdivIhQ4pNw6SalPr',
access_token_key: twitter_accessToken,
access_token_secret: twitter_accessTokenSecret,
});
});
}
event.preventDefault();
});
twitteroauthwindow.loadURL(url);
});
mentionget();
}

function mentionget(){
if(client != null){
client.get('statuses/mentions_timeline', (error, tweet, response) => {
var mention;
if(!error){mention = tweet[0]["text"];}
else{mention = null}
mention = tweet[0]["text"];
ipcMain.once('asynchronous-message', (event, arg) => {
event.sender.send('asynchronous-reply', mention);
});
});
}
setTimeout(mentionget, 6000);
setTimeout(mentionget, 15000);
}

/*---------Main process----------*/
app.on('ready', () => {
twitteraouth();
mentionget();
createWindow();
});

Expand Down

0 comments on commit a204a03

Please sign in to comment.