2013-06-04 5 views
3
// Display the requests dialog 

[FBWebDialogs presentRequestsDialogModallyWithSession:nil message:@"Learn how to make your iOS apps social." title:nil parameters:params handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) { 
    if (error) { 
     // Error launching the dialog or sending the request. 
     NSLog(@"Error sending request."); 
    } 
    else { 
     if (result == FBWebDialogResultDialogNotCompleted) { 
      // User clicked the "x" icon 
      NSLog(@"User canceled request."); 
     } 
     else { 
      // Handle the send request callback 
      NSDictionary *urlParams = [self parseURLParams:[resultURL query]]; 
      if (![urlParams valueForKey:@"request"]) { 
       // User clicked the Cancel button 
       NSLog(@"User canceled request."); 
      } 
      else { 
       // User clicked the Send button 
       NSString *requestID = [urlParams valueForKey:@"request"]; 
       NSLog(@"Request ID: %@", requestID); 
      } 
     } 
    } 
}]; 

답변

0

명확하게하기 위해 요청은 사용자 벽/피드에 표시되지 않고 "글로브"아이콘 아래에 표시됩니다. 그러나 다음과 같은 경우에는 알림에 요청이 표시되지 않습니다.

1) 응용 프로그램이 샌드 박스 모드이고 수신기가 응용 프로그램 개발자가 아닙니다. (모든 레벨)

2) 사용자가 FB에서 앱/알림에 대한 요청을 사용 중지했습니다. (https://www.facebook.com/settings?tab=notifications)

개인적인 경험으로 볼 때, 페이스 북은 스팸을 너무 많이 보내거나 게시물에 대한 평점이 낮은 경우 요청에 대한 알림을 표시하지 않는 경향이 있습니다. (facebook.com/insights을 확인하십시오)

관련 문제