Thanks Akhil, but I can't seem to get any tweets that include location data. For example, when I do stream.filter(status => status.getPlace().getName) and run the code for 20 minutes I only get null values.It seems like Twitter might purposely be removing the Place for free users?
On Tue, Sep 22, 2015 at 2:20 AM, Akhil Das <ak...@sigmoidanalytics.com> wrote: > That's because sometime getPlace returns null and calling getLang over > null throws up either null pointer exception or noSuchMethodError. You need > to filter out those statuses which doesn't include location data. > > Thanks > Best Regards > > On Fri, Sep 18, 2015 at 12:46 AM, Jo Sunad <naidnitr...@gmail.com> wrote: > >> I've been trying to filter for GeoLocation, Place or even Time Zone and I >> keep getting null values. I think I got one Place in 20 minutes of the app >> running (without any filters on tweets). >> >> Is this normal? Do I have to try querying rather than filtering? >> >> my code is following TD's example... >> >> val stream = TwitterUtils.... >> >> val hashtags = stream.map (status => status.getPlace().getName(), >> status.getText()) >> >> getText, getFollowers, etc all work fine, I just don't get anything >> location based (and getLang() for some reason throws a noMethodError). >> >> Thanks for the help! >> > >