在我的iPhone应用程序中,我想实现“签到”功能(Facebook Places)。
如何使用Facebook Graph API签到?
发布于 2011-05-21 19:26:52
FbGraphResponse *fb_graph_response = [fbGraph doGraphGet:@"me/checkins" withGetVars:nil];
NSLog(@"getMeButtonPressed: %@", fb_graph_response.htmlResponse);
//parse our json
SBJSON *parser = [[SBJSON alloc] init];
NSMutableArray *facebook_response =(NSMutableArray *)[fb_graph_response.htmlResponse JSONValue];//[parser objectWithString:fb_graph_response.htmlResponse error:nil];
[parser release];
NSMutableArray *feed =(NSMutableArray *) [facebook_response valueForKey:@"data"];
NSLog(@"%@",feed);在提要中,您可以找到已签入的位置的jason数据。如果你得到了" nil“数据,这意味着你还没有签到任何地方,所以你必须首先使用你的个人资料和FB.but签到一些地方,如果在这种情况下它是零的话。
我使用了这个引用中的例子:-https://github.com/reallylongaddress/iPhone-Facebook-Graph-API
因此,请根据您的需求进行调整
https://stackoverflow.com/questions/6081284
复制相似问题