You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/11/12 11:37:18 UTC
[jira] [Resolved] (CAMEL-6107) Language option not working for
twitter streaming event filter
[ https://issues.apache.org/jira/browse/CAMEL-6107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-6107.
--------------------------------
Resolution: Fixed
Fix Version/s: (was: Future)
2.13.0
2.12.2
2.11.3
Upgraded to twitter4j 3.0.5
> Language option not working for twitter streaming event filter
> --------------------------------------------------------------
>
> Key: CAMEL-6107
> URL: https://issues.apache.org/jira/browse/CAMEL-6107
> Project: Camel
> Issue Type: Bug
> Components: camel-twitter
> Affects Versions: 2.11.0
> Reporter: Kevin Telford
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.11.3, 2.12.2, 2.13.0
>
>
> The filter seemed to be working when the streaming filter type was userids, but that could have just been happenstance. Either way, when running a streaming event filter with a language option set I observe tweets coming in that are from users who have their language preferences set to other than the specified language. I'm only assuming here this is what they are/should be matching against so this could be moot.
> Example route code:
> {code}
> @Override
> public void configure() throws Exception {
> String keywords = "lol"; // any language-neutral term should work
> fromF("twitter://streaming/filter?type=event&lang=en&keywords=%s"
> + "&consumerKey=%s&consumerSecret=%s&accessToken=%s&accessTokenSecret=%s",
> keywords, consumerKey, consumerSecret, accessToken, accessTokenSecret)
> .process(new Processor() {
> @Override
> public void process(Exchange exchange) throws Exception {
> String json = exchange.getIn().getBody().toString();
> if (json.contains("lang='en'")) {
> System.out.println("Correct");
> } else {
> System.out.println(json);
> }
> }})
> .end();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)