3

I am using the following code to get the feeds:

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];
4

1 回答 1

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"]];
于 2013-05-21T10:30:51.903 回答