Ios 在Facebook api中,如何设置订阅源的限制以获得接下来的5个订阅源?
我正在使用以下代码获取提要:Ios 在Facebook api中,如何设置订阅源的限制以获得接下来的5个订阅源?,ios,facebook,Ios,Facebook,我正在使用以下代码获取提要: NSDictionary *dirTemp; NSError *error; NSStringEncoding encoding; NSString *strUrl = [NSString stringWithFormat:@"https://graph.facebook.com/%@/posts?access_token=AppID|AppSecret&limit=5",strIdValue]; //NSLog(@"Your String URL i
NSDictionary *dirTemp;
NSError *error;
NSStringEncoding encoding;
NSString *strUrl = [NSString stringWithFormat:@"https://graph.facebook.com/%@/posts?access_token=AppID|AppSecret&limit=5",strIdValue];
//NSLog(@"Your String URL is %@",strUrl);
NSURL *url = [NSURL URLWithString:[strUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSString *strResonse = [NSString stringWithContentsOfURL:url usedEncoding:&encoding error:&error];
dirTemp = [strResonse JSONValue];
你不应该发布你的秘密值。另外,你的结论似乎是正确的,你面临什么问题?我在回复中得到了解决方案。作为回复,它包含了一个用于下5个Facebook提要的分页链接。如果你可以添加相同的答案并接受它,以帮助将来面临类似问题的人,那将是一件好事。NSDictionary*dirTemp;NSSTRING编码;NSString*strUrl=[NSString stringWithFormat:@;NSURL*url=[NSURL URLWithString:[strUrl STRINGBYADTINGESCAPESUSINGENCODE:NSUTF8STRINGENCONDING]];NSString*strResonse=[NSString stringWithContentsOfURL:url使用的编码:&编码错误];DIRTTEMP=[STRRESONSTRESONSE JSONValue];NSDictionary*PAGINATIONDICTIONICT=[DIRTTEMP VALUESOFKY:]分页“];NSString*pagelink=[[NSString alloc]initWithString:[paginationDict objectForKey:@“next”];将其添加到下面的答案中,并接受它。不在注释中。
NSDictionary *dirTemp;
NSStringEncoding encoding;
NSString *strUrl = [NSString stringWithFormat:@"graph.facebook.com/%@/…;
NSURL *url = [NSURL URLWithString:[strUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSString *strResonse = [NSString stringWithContentsOfURL:url usedEncoding:&encoding error:&error];
dirTemp = [strResonse JSONValue];
NSDictionary *paginationDict=[dirTemp valueForKey:@"paging"];
NSString *pagelink=[[NSString alloc]initWithString:[paginationDict objectForKey:@"next"]];