If you want to setup Facebook App Invites of an iOS app then follow these steps.
Using Facebook graph API , make a request to get facebook app_access_token (app_access token is not login access_token) . I m using google chrome postman to make request as shown :-
After you get app_access_token, make another request as shown :-
Now use app_FB_ID to get Facebook app invite URL. Make another request as shown :-
In View controller , add a button and write this code to send app invites to Facebook friends as follows :-
-(IBAction)shareApplinks:(id)sender {
FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
content.appLinkURL = [NSURL URLWithString:@"paste here Facebook _appInviteURL"];
content.previewImageURL = [NSURL URLWithString:@"paste here your app image (logo) url"];
[FBSDKAppInviteDialog showWithContent:content
delegate:self];
}
0 Comment(s)