2012-04-17 1 views

답변

2

페이스 북 그래프 API를 사용하여 사용자의 현재 위치를 가져 오는 것을 의미합니까? https://github.com/facebook/facebook-ios-sdk/tree/master/sample/Hackbook

- (void)apiGraphSearchPlace:(CLLocation *)location { 

    currentAPICall = kAPIGraphSearchPlace; 
    NSString *centerLocation = [[NSString alloc] initWithFormat:@"%f,%f", 
           location.coordinate.latitude, 
           location.coordinate.longitude]; 
    HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate]; 
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
            @"place", @"type", 
            centerLocation, @"center", 
            @"1000", @"distance", 
            nil]; 
    [centerLocation release]; 
    [[delegate facebook] requestWithGraphPath:@"search" andParams:params andDelegate:self]; 
} 
+0

감사 :

여기에 내가 (iOS 용 Hackbook) 페이스 북에서 제공하는 샘플 애플리케이션 링크에서 차용 샘플 코드입니다! 나는 그것을 사용하려고했지만 내 애플 리케이션에 그것을 통합하는 문제로 실행했습니다. – hanumanDev

관련 문제