So, I'm using the twitter API w / MeteorJS, and what I'm trying to do is just show the Twitter username on the browser. This is what I have done so far:
Meteor.methods({ 'screenName': function() { T.get('search/tweets', { q:'#UCLA', count:1 }, function(err,data,response) { console.log(data.statuses[0].user.screen_name); return data.statuses[0].user.screen_name; } ) } });
Therefore, I call the 'screenName' method on my part isClient. I call it from my client side as follows:
var temp = Meteor.call('screenName');
On the server side, it displays the correct value on the console, but cannot return this value. It continues to display undefined.
I am a beginner of javascript, so I can be wrong that I donโt see right away, so if someone can help me, I would really appreciate it.
Thanks!
javascript meteor twitter
halapgos1
source share