javascript - Authorization header using OAuth1.0A for Twitter API v1.1 -
i building search engine start-up project in web development. search engine takes string , queries wiki , twitter api. have been working on days and, believe, have found nice, clean way implement it.
in code (which beautifully written) has set twitter function takes in config variable , sets authorization us. there missing? have been through , looks great. new javascript , might missing something..
my code:
var error = function (err, response, body) { console.log('error [%s]', err); }; var success = function (data) { console.log('data [%s]', data); }; var config = { "consumerkey": "{mine}", "consumersecret": "{mine}", "accesstoken": "{mine}", "accesstokensecret": "{mine}", "callbackurl": "" } var twitter = require('twitter-node-client').twitter; var twitter = new twitter(config); twitter.getsearch({'q':'lebron james','count': 10}, error, success);
can help? have done before , know easier way? has been able working using postmessage()?
and yes... origin using https protocol. see: jbengine. app permission (on twitter) set read only.
[edit] should mention glob'd browserify , running script client-side.
Comments
Post a Comment