我使用以下代码获取Feed:
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];
答案 0 :(得分:0)
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"]];