How to invite friends to my application via facebook iOS SDK and Graph API

后端 未结 8 453
攒了一身酷
攒了一身酷 2021-02-01 17:55

I\'m writing an iPhone application.

I want to give the user the option to invite friends to start using my application via Facebook.

More specifically I want to

8条回答
  •  日久生厌
    2021-02-01 18:28

    It's simple you can just write the below code for personalised message and also you can easily select the friend's to whom the request should be sent, it's an straight forward and powerful method.

     [FBWebDialogs
     presentRequestsDialogModallyWithSession:nil
     message:NSLocalizedString(@"FBinviteMessage", nil)
     title:nil
     parameters:nil
     handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {}
    ];
    

    Just add this six line of code to your Button action method, then the rest will be done by the IOS & FaceBook Inbuilt framework :)

提交回复
热议问题