Send Invite message from ios app

359 views Asked by At

I integrated Facebook SDK into my iOS native APP. I completed login and received active FBSession. Then I ask for publish permission and then I want send invite to my single friend like Candy Crush Saga for example. Is it possible?

Can you help me please?

To publish post I use:

NSMutableDictionary *params = [@{
                         @"link" : @"https://developers.facebook.com/ios",
                         @"picture" : @"https://developers.facebook.com/attachment/iossdk_logo.png",
                         @"name" : @"Facebook SDK for iOS",
                         @"caption" : @"Build great social apps and get more installs.",
                         @"description" : @"The Facebook SDK for iOS makes it easier and faster to develop Facebook integrated iOS apps."
                         } mutableCopy];

[FBRequestConnection
 startWithGraphPath:@"me/feed"
 parameters:params
 HTTPMethod:@"POST"
 completionHandler:^(FBRequestConnection *connection,
                     id result,
                     NSError *error) {
     NSString *alertText;
     if (error) {
         alertText = [NSString stringWithFormat:
                      @"error: domain = %@, code = %d",
                      error.domain, error.code];
     } else {
         alertText = [NSString stringWithFormat:
                      @"Posted action, id: %@",
                      result[@"id"]];
     }
     // Show the result in an alert
     [[[UIAlertView alloc] initWithTitle:@"Result"
                                 message:alertText
                                delegate:self
                       cancelButtonTitle:@"OK!"
                       otherButtonTitles:nil]
      show];
 }];

but what's the graph path to send invite?

Thanks in advance

Luca

0

There are 0 answers