Hi Kathees,

Yes, since twitter API doesn't have AND operation what we can do is a
"filter" process. As you said, we are using the track operation only and
from this stream we read the user ID and filter the ones we need. We do
this manual filtering in CEP currently. If we pass the follower ID to
another inbound endpoint, wouldn't we get all the tweets that this person
sent?

Regards,
Anoukh

On Tue, May 31, 2016 at 6:45 PM, Kathees Rajendram <kath...@wso2.com> wrote:

> Hi Anoukh,
>
> The twitter streaming API [1] provides the filter operation with the track
> follow, and locations fields are combined with an OR operator. Twitter
> streaming API doesn’t have AND operation.
>
> Can you try with two twitter inbound endpoints and twitter connector, In a
> inbound endpoint, use the track operation to get the public stream with the
> keyword. In ESB, the streaming output data are injected to a sequence. From
> the output you can read user or follower ID. If there are no follower ID,
> use the twitter connector method to retrieve the follower ID. In second
> twitter Inbound endpoint, pass the follower ID with comma separator to
> retrieve follower's streaming data.
>
> [1] - https://dev.twitter.com/streaming/reference/post/statuses/filter
>
> [2] -
> https://docs.wso2.com/display/ESBCONNECTORS/Configuring+Twitter+Inbound+Operations
>
> Thanks,
> Kathees
>
> On Tue, May 31, 2016 at 5:51 PM, Anoukh Jayawardena <ano...@wso2.com>
> wrote:
>
>> Hi
>>
>> There is a use case in the US Election analytic app (refer
>> https://wso2.com/election2016/) to use twitter.track and twitter.follow
>> parameters together.
>> This is to pull the tweets of certain accounts (hence the twitter.follow)
>> that include certain words (hence the twitter.track). So requirement is
>> twitter.follow AND twitter.track.
>> These two operations are combined using an "OR" operation from twitter
>> API itself (refer
>> https://dev.twitter.com/streaming/reference/post/statuses/filter).
>> Is there a way we can support "AND" operation within ESB?
>>
>> Currently we only do the twitter.follow operation from ESB and filter the
>> words manually from the stream.
>>
>>
>> Regards
>> Anoukh Jayawardena
>> --
>> Anoukh Jayawardena
>> *Software Engineer - Intern*
>> Mobile : +94779928932
>> ano...@wso2.com
>>
>
>
>
> --
> Kathees
> Software Engineer,
> email: kath...@wso2.com
> mobile: +94772596173
>



-- 
Anoukh Jayawardena
*Software Engineer - Intern*
Mobile : +94779928932
ano...@wso2.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to