As an update, in the above config variable, i entered “” for “XXX”.
When I tried to deploy the function, I received the following error message:
ERROR MSSG
Deployment failure:
Function load error: Code in file index.js can't be loaded.
Is there a syntax error in your code?
Detailed stack trace: /srv/index.js:56
twitter.getSearch({'q':' #voicefirst', since:’2018-10-18 15:24:15', ‘user’, ‘text’, ‘retweet_count’, 'result_type':'popular'}, error, success);
^
SyntaxError: Invalid or unexpected token
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at getUserFunction (/worker/worker.js:391:24)
It identifies the Search Query as a potential problem, but not the authorization. Does that mean the authorization is ok? Because I entered “” in place of the “XXX” in the authorization credentials in the index.js file:
SEARCH QUERY
twitter.getSearch({‘q’:’ #voicefirst’, since:’2018-10-18 15:24:15’, ‘user’, ‘text’, ‘retweet_count’, ‘result_type’:‘popular’}, error, success);
I’ve stitched this code together from various sources, so if anyone has any direction on how to troubleshoot what’s going on, greatly appreciated.