【问题标题】:Trouble getting search results using MGTwitterEngine使用 MGTwitterEngine 获取搜索结果时遇到问题
【发布时间】:2011-02-09 17:38:10
【问题描述】:

我正在使用 Matt Gemmell 的 MGTwitterEngine 的一个版本,我正在尝试从 getSearchResultsForQuery 方法中获取一些结果。

// do a search
[_engine getSearchResultsForQuery:@"#quote"];

// delegate method for handling result
- (void)searchResultsReceived:(NSArray *)searchResults forRequest:(NSString *)connectionIdentifier
{
    if ([searchResults count] > 0)
    {
        NSDictionary *singleResult = [searchResults objectAtIndex:1];
    NSString *text = [singleResult valueForKey:@"text"]; 
        NSLog(@"Text at Index one: \n %@", text);
    }
}

但是,我似乎从来没有得到结果。在控制台中,我得到:

Request 7E4C3097-88D6-45F1-90D2-AD8205FBAAC5 failed with error: Error Domain=HTTP Code=400 "Operation could not be completed. (HTTP error 400.)"

有没有办法解决这个问题?我是否实现了委托方法? (另外,我在为引擎安装 YAJL 的东西时遇到了困难,想知道这是否与它有关)

【问题讨论】:

    标签: iphone objective-c twitter mgtwitterengine


    【解决方案1】:

    使用 DEBUG 常量等于 1 构建 MGTwitterEngine,看看 finalURL 给你什么。在此处发布或使用http://apiwiki.twitter.com/Twitter-API-Documentation 确认它是正确的

    【讨论】:

      【解决方案2】:

      我明白了:

      (gdb) po 错误->_userInfo { body = "\n\n
      /oauth /access_token\n
      不允许客户端应用使用xAuth。\n
      \n"; 响应 = ; }

      您需要为您的应用程序请求 xauth。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-11-25
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多