Question

Can someone tell whether my understanding is correct.

twitterstream.addlistener(listner)

is for each tweet we are capturing?

Dataobjectfactory.getRawjson(status)

converts object into json string?

Was it helpful?

Solution

First of all, twitterstream.addlistener(listner) is for generating a listener in twitterstream to listen all tweets which hit your conditions. So, that means you do not have to add more than one listener to get all the tweets. However, you might add more than one listener for different purposes like getting tweets only having a particular hashtag with each listener, etc..

The second thing you asked (Dataobjectfactory.getRawjson(status)) is returning the json formatted string of the caught tweet status.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top