iPhone中的Foursquare集成
发布时间:2020-12-14 17:22:22 所属栏目:百科 来源:网络整理
导读:我正试图在iPhone中进行FourSquare集成.我无法通过Goggling找到任何好的指导方针….任何人都可以向我推荐iPhone中的FourSquare集成的良好指南或URL. 谢谢 解决方法 这是foursquare api link Foursquare integration link的示例. Foursquare集成的进一步代码
我正试图在iPhone中进行FourSquare集成.我无法通过Goggling找到任何好的指导方针….任何人都可以向我推荐iPhone中的FourSquare集成的良好指南或URL.
谢谢 解决方法
这是foursquare
api link
Foursquare integration link的示例. Foursquare集成的进一步代码 - (void)viewDidLoad { [super viewDidLoad]; self.title = @"Foursquare"; //check the authentication if ([Foursquare2 isNeedToAuthorize]) { //If needed show the webview webView = [[UIWebView alloc]initWithFrame:CGRectMake(0,320,480)]; NSString *url = [NSString stringWithFormat:@"https://foursquare.com/oauth2/authenticate?display=touch&client_id=%@&response_type=code&redirect_uri=%@",OAUTH_KEY,REDIRECT_URL]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]]; [webView loadRequest:request]; [webView setDelegate:self]; [self.view addSubview:webView]; [webView release]; mTableView.hidden = YES; }else{ //Show your view mTableView.hidden = NO; [Foursquare2 searchVenuesNearByLatitude:@"40.763" longitude:@"-73.990" accuracyLL:nil altitude:nil accuracyAlt:nil query:@"" limit:@"15" intent:@"" callback:^(BOOL success,id result){ if (success) { tableData = [[FoursquareParser parseSearchVenuesResultsDictionary:(NSDictionary*)result] retain]; [mTableView reloadData]; } }]; } } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |