我的代码:
NSString *urlString = [NSString stringWithFormat:@"%@%@%@%@", @"http://api.search.live.net/json.aspx?Appid=am hiding the appid &query=",text,@"&sources=web&web.offset=",offvalue];
NSURL *url = [NSURL URLWithString:urlString];
NSData *data = [NSData dataWithContentsOfURL:url];
JSON 响应:
SearchResponse = {
Errors = (
{
Code = 1002;
HelpUrl = "http://msdn.microsoft.com/en-us/library/dd251042.aspx";
Message = "Parameter has invalid value.";
Parameter = "SearchRequest.AppId";
Value = " am hiding the value";
}
);
Query = {
SearchTerms = iphone;
};
Version = "2.2";
};
}
我在这里做错了什么。谁能纠正我的查询?如何使用 2.2 版的 bing API