14

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.

John Doe
  • 3,559
  • 15
  • 62
  • 111
  • What do you mean by this: " A notification appears in the app when it's sent but ouside of the app, nothing." – pteofil Apr 28 '15 at 11:07
  • I mean there is a Facebook "notification" in the app but no push notification @pteofil. – John Doe Apr 28 '15 at 19:47
  • So, you send me an invitation. I look in my Facebook app, and I see the invitation, but I don't get a push notification for it? – pteofil Apr 28 '15 at 19:59
  • That is correct @pteofil. – John Doe Apr 28 '15 at 19:59
  • Then, maybe that phone has some push notifications disabled. But as far as you're concerned the invite is being sent successfully. – pteofil Apr 28 '15 at 20:00
  • There's not some mode I'm in or some kind of approval right? I have reason to believe that everything is configured correctly – John Doe Apr 28 '15 at 20:03
  • It's been a while since I worked on this, so you'll have to wait and maybe get some answers from some people that worked more recently with this. I believe you only need to have approved if you have a page as a Facebook app. But not to invite in app. Do note though that invite send from mobile, only show up on mobiles, not desktop. – pteofil Apr 28 '15 at 20:18
  • Send me an invite from your app. i have application notifications enabled(which is by default). Let me know. – jkr Apr 30 '15 at 10:01
  • 2
    check out this link http://stackoverflow.com/questions/29383395/facebook-app-invites-ios-sdk-v4-0-configuration-and-states – youssman May 03 '15 at 00:33

2 Answers2

2

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.

jkr
  • 630
  • 1
  • 11
  • 24
0

Facebook seems to have resolved the issue as it now appears to be functioning correctly.

John Doe
  • 3,559
  • 15
  • 62
  • 111