Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Filtered Stream Match Any with only Location

$
0
0
Hi,

I've created a filtered stream that only has a location. I've then started the stream using StartStreamMatchingAnyCondition method. However, I am getting tweets found that do not match the location. Here is the code I use to start the stream:
var filteredStream = FilteredStreamFactory.Create();

foreach (var term in terms)
{
    filteredStream.AddTrack(term);
}

foreach (var user in users)
{
    var userId = UserFactory.GetUserFromScreenName(user).Id;
    filteredStream.AddFollow(userId);
}

if (geocode != null)
{
    var bounds = new Bounds(geocode.Latitude, geocode.Longitude, geocode.Radius);

    var southWest = new Coordinates(bounds.WestLongitude, bounds.SouthLatitude);
    var northEast = new Coordinates(bounds.EastLongitude, bounds.NorthLatitude);
    var location = new Location(southWest, northEast);

    filteredStream.AddLocation(location);
}

filteredStream.StartStreamMatchingAnyCondition();
Here is the debug window just before the stream is started. As you can see it has no tracks, no follows and one location. And yet it pulls in tweets that have no location information at all. Is this correct behaviour? I would think that using the StartStreamMatchingAnyCondition method in this way would require the tweet to have a location in order to be found.

Image

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>