从ios应用程序发送邀请消息

时间:2013-09-07 12:03:09

标签: facebook-graph-api facebook-invite

我将Facebook SDK集成到我的iOS原生APP中。我完成了登录并收到了活跃的FBSession。然后我要求发布许可,然后我想发送邀请给我的单身朋友,比如Candy Crush Saga。有可能吗?

你能帮我吗?

要发布我使用的帖子:

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];
 }];

但是发送邀请的图表路径是什么?

提前致谢

卢卡

0 个答案:

没有答案