我正在尝试在 iPhone 中集成 FourSquare..我无法通过 Goggling 找到任何好的指南....任何人都可以向我建议在 iPhone 中集成 FourSquare 的好的指南或 URL..
谢谢
最佳答案
这是四方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, 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];
}
}];
}
}
关于iphone - iPhone 中的 Foursquare 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14929973/