Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook iOS SDK 4.0 "App Invites" sent without iOS notification

I am currently using the Facebook iOS SDK 4.0. In examples they show that when a user sends an app invite, the receiver gets a notification from the FB app. That's not happening with me. A notification appears in the app when it's sent but ouside of the app, nothing. Here is my code:

- (IBAction)inviteFriends:(id)sender {

    FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] initWithAppLinkURL:[NSURL URLWithString:@"https://fb.me/413510792107174"]];
    [FBSDKAppInviteDialog showWithContent:content delegate:self];

}

Because there is a notification in the app, it leads me to believe that the code is correct it's just a matter of configuration. Specifically, this is what I'm trying to achieve: https://developers.facebook.com/docs/app-invites/overview.

I've also tested for the app NOT being installed with the same result. I'm curious if anyone else is having this problem. Thanks in advance.

like image 582
John Doe Avatar asked Apr 22 '15 04:04

John Doe


1 Answers

The following documentation on Facebook developer site, may help resolving it. testing with "test users" may help.

Testing

We have internal logic that determines whether a push notification is sent to the client. If we detect that the person has installed the app, we may not trigger a push notification. The best way to test push notifications is to use test users.

EDIT: if "test users are authorized for this app", test users will have this app installed by default. Which means, you will have to send request before test user authorizes the app. Also, Test users can only interact with other test users, and not with real users.

like image 119
jkr Avatar answered Nov 02 '22 12:11

jkr