2

如何在我的应用程序中实现foursquare。我尝试了一些示例应用程序,但我不知道该怎么做。任何人都可以指导我。

谢谢....

4

2 回答 2

2

https://github.com/Constantine-Fry/Foursquare-API-v2/tree/master/Foursquare2-iOS

下载此项目并将 Foursquare2 文件夹拖到您的项目和 json 解析器中。

这是我为获得附近的地方所做的事情。

   [Foursquare2 searchVenuesNearByLatitude:lat_String 
                              longitude:log_String 
                                 accuracyLL:nil 
                                   altitude:nil 
                                accuracyAlt:nil 
                                      query:searchString
                                      limit:@"10" 
                                     intent:@"browse" 
                                 categoryId:nil
                                     Radius:radius
                                   callback:^(BOOL     success,id result){
                                       if (success) {
                                          //     NSLog(@"Result : %@",result);
                                           [self     parseplacesForSearch:result];
                                       }
                                       else {
                                               UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"Message" 
                                                                                                  message:@"Sorry!! their is no places around your location" 
                                                                                                 delegate:nil 
                                                                                    cancelButtonTitle:@"OK" 
                                                                                    otherButtonTitles:nil ];
                                           [alertView show];
                                           [alertView release];
                                       }

                                   }];
于 2012-05-17T10:52:37.627 回答
2

以下是github上提供的示例应用程序...

  1. anoopr / 核心数据谈话
  2. Constantine-Fry / Foursquare-API-v2
于 2012-05-17T10:36:11.500 回答