首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在TWRequest中过滤转发

在TWRequest中过滤转发
EN

Stack Overflow用户
提问于 2012-07-04 19:20:41
回答 1查看 168关注 0票数 0

我正在使用TWRequest来查询推特。我想知道如何添加+排除:转发过滤器在URL的末尾。这是我的代码:

代码语言:javascript
复制
NSString *searchURL = [NSString stringWithFormat:@"http://search.twitter.com/search.json"];
        NSMutableDictionary *dict_req;

dict_req = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"50", @"rpp", @"true", @"include_entities", searchParams, @"q", nil];

TWRequest *request = [[TWRequest alloc] initWithURL:[NSURL URLWithString:searchURL]
                                                      parameters:dict_req requestMethod:TWRequestMethodGET];

[request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error)
     {
      //results
    }];
EN

回答 1

Stack Overflow用户

发布于 2012-07-04 19:25:23

第一个可行的解决方案是:使用nil作为参数字典,并手动将参数添加到searchURL中。不幸的是,它似乎不适用于复杂的查询...

stringWithFormat:@"http://search.twitter.com/search.json?q=ciao+exclude:retweets";= NSString NSString *searchURL

TWRequest *request =[TWRequestMethodGET];

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11328064

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档