iphone - iPhone 中的 Foursquare 集成

标签 iphone ios objective-c xcode ipad

我正在尝试在 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/

相关文章:

ios - 在没有播放按钮覆盖的情况下在 ios 中显示 html5 视频

javascript - ios 上的位置警报

ios - 将 NS_OPTIONS 存储在 swift 字典中

iphone - 如何反转音频样本?

iOS 复合谓词

iphone - 使用 AudioQueueServices 同时播放 (10+)

ios - 动画时 UIView 不动

iphone - Objective C iPhone 何时将对象引用设置为 nil

ios - SDWebImage 缓存对象的大小

ios - UILabel 设置 onClick