ttezel / twit

Twitter API Client for node (REST & Streaming API)
4.31k stars 568 forks source link

Get user id from searched tweets #403

Closed xavdep closed 6 years ago

xavdep commented 6 years ago

Hi,

To start thanks for this repo !

Here is my question:

I do this to search some tweets

T.get('search/tweets', { q: 'something since:2011-07-11', count: 10 }, function(err, data, response) {
  console.log(data)
})

So in data I get my tweets.

My question: What is the code to do to have users ids that post each tweet previously searched? And why not store it in a table.

Thanks all

(I tried to log data.statuses.user or data.user but don't work. Maybe a JSON parser? But in JSON users appears like "object" and don't give user id.)

gwuah commented 6 years ago

You can decide to do a lookup of the handle for the userid There's a method for that. You should check the docs

xavdep commented 6 years ago

Ok i Will check docs, thanks