NSString *urlString = @"https://www.googleapis.com/customsearch/v1?key=AIzaSyDochCep4-pyP_VyC-yTxqvVXz2oUccvOQ&cx=015184184090674442837:dkitjh1tmc8&q=";
urlString = [urlString stringByAppendingString:appDelegate.globalWordName]; //appdelegate.globalwordname is required images name
urlString = [urlString stringByAppendingString:@"&searchType=image&safe=high&imgSize=medium&start=1&num=10&alt=json"];
(或者)
NSString *urlString = @"https://www.googleapis.com/customsearch/v1?key=AIzaSyBfsopy4kXXiZ44BRUE1pVMyacSUa0Bn1E&cx=cx=011683172338421882045:tcle_wvfko8&q=";
urlString = [urlString stringByAppendingString:appDelegate.globalWordName];
urlString = [urlString stringByAppendingString:@"&searchType=image&safe=high&imgSize=medium&start=1&num=10&alt=json"];
(或者)
NSString *urlString = @"https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=";
urlString = [urlString stringByAppendingString:appDelegate.globalWordName];
urlString = [urlString stringByAppendingString:@"&rsz=8"];
我正在使用上述三种格式,但没有得到任何结果。执行上述查询后,它只返回 null。请帮助我做错了什么。