Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Search twitter with appcelerator

Im following the twitter example in the kitchen sink. I am trying to utilize the twitter search api.
Eg of a url will be
http://search.twitter.com/search.json?rpp=30&q=#marketing

If I want to search more than 1 term, the following is the url
http://search.twitter.com/search.json?rpp=30&q=#IR+OR+#PR+OR+#Advertising+OR+#Marketing

The first url works in xhr but the second wont. As the '+' get encoded t0 %2B.
Is there anyway to stop this?

— asked December 1st 2010 by Blessan Mathew
  • twitter
  • xhr
1 Comment
  • Would you post your code, please? Thanks

    — commented December 1st 2010 by Paul Dowsett

4 Answers

  • Hasnt anyone tried the twitter search api in appcelerator.

    — answered December 2nd 2010 by Blessan Mathew
    permalink
    0 Comments
  • I think the URI component is the problem. Its encoding my # and +. Heres my code

    var xhr = Ti.Network.createHTTPClient();
    xhr.timeout = 1000000;    
    xhr.open("GET","http://search.twitter.com/search.json?rpp=30&q=#IR+OR+#PR+OR+#Advertising+OR+#Marketing");
    xhr.send();
    

    If the '+' and '#' gets encoded there wont be any results. If you put the url directly to your browser u can see the results.

    — answered December 2nd 2010 by Blessan Mathew
    permalink
    0 Comments
  • I think the URI component is the problem. Its encoding my # and +. Heres my code

    var xhr = Ti.Network.createHTTPClient();
    xhr.timeout = 1000000;    
    xhr.open("GET","http://search.twitter.com/search.json?rpp=30&q=#IR+OR+#PR+OR+#Advertising+OR+#Marketing");
    xhr.send();
    

    If the '+' and '#' gets encoded there wont be any results. If you put the url directly to your browser u can see the results.

    — answered December 2nd 2010 by Blessan Mathew
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.