I'm using FBSDKAppInviteContent to invite people to my app. I'm able to go through the wizard (after finally resolving an error about my app link which was incorrect, now it's not) and the invite was sent. No hiccups, and the delegate responds with {didComplete:1}.
However.. the notification doesn't reach the persons that I want to invite! I have verified:
My app is Live
My app has a valid iPhone Store ID
The app link opens the app
What have I missed?
I finally solved it with the help from the Facebook Developer Community.
The notification are only sent to the same platform your application is serving. If you have set it to iOS, the user who recieves the invitation will only be noitified on his iOS mobile, not on his Android, nor in the browser, desktop or mobile.
Hope that helps another poor sole!
Related
I'm trying to set up App Invites on an iOS app I developed. However, when I invite others to use the app, they do not get any notifications.
Right now, the App Link I obtained redirects me to a link starting with itunes.apple.com, but the screen is blank. In addition, when I run the didCompleteWith Results function, I get "didComplete = 1;". I am not sure why the invitation is not working and why the person on the other end is not getting a notification. I have a hunch it could have to do with my App Link, but I am honestly not sure at all. I am trying to use Facebook's purely Mobile API since I do not have a website for my app. Also, it is not released on the App Store.
Any and all help is greatly appreciated.
Thanks!
I'm trying to implement App invites from my iOS App.Invites are sent out successfully, but test users never receive anything. This is how i send out invites:
FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] initWithAppLinkURL:[NSURL URLWithString:#"https://fb.me/xxxxxxxxxxx"]];
content.previewImageURL = [NSURL URLWithString:#"https:xxxxxx.png"];
[FBSDKAppInviteDialog showWithContent:content delegate:self];
The App has been approved on Facebook but is still in testing before submitting to the App Store. It is an iOS only app. In testing the App successfully sends out App invites and receives a response in the delegate method
-(void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didCompleteWithResults:(NSDictionary *)results
the response is "didComplete = 1 "which confirms this. I have also tested the App link attached to the Invite to check it works, if the app is not installed Facebook tries to find it on the App store, if it is installed the link opens the app. I've tried using Test users who are not enabled on the app, i've also tried assigning real accounts with tester roles. Neither receive the invite. This is version 1.0 of the app, so its not currently in the app store, therefore it is not possible to set the "iPhone Store ID" setting on the Facebook App settings page. Does the app need to be live in the Apple app store before users receive an invite? I would have thought test users/testers would still receive an invite even if its not live in the Apple App Store?If not, Facebook documentation doesn't seem to mention this anywhere.
I've been researching what might be wrong, but can't seem to sort this out. There are similar questions on Stack overflow, but none that match exactly for this case and SDK version. The solutions suggested in the similar cases don't work for me either. I would simply comment on those existing questions, but i don't have enough reputation points to comment!Please help!
Just found a solution - Looks like you need to put in a live iPhone Store ID into your Facebook App Settings. When i did this the invite was received by 'Test Users' but it is still not received by real accounts that i have assigned as 'Testers'. Not sure why it is still not working for the Testers, but at least i know now that its just because the app is not live and its not a coding issue with the app! This is good enough for me to go ahead with releasing it on the app store without worrying too much! I'll give it a test once its live on the app store.
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.
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.
Facebook seems to have resolved the issue as it now appears to be functioning correctly.
I upgraded my apps (iOS and Android) to the new Facebook SDK (V4.0) to use the Facebook app invite. (See https://developers.facebook.com/products/sharing/app-invites).
My problem: when I send an invitation to a Facebook friend he gets a notification if he is using an Android device, but he doesn't get one if he is on iOS (even if he normally receives notifications from Facebook). Despite that, in both cases I can find the invitation in the Facebook app. So the problem is just about the notifications.
Do you know if Facebook has not implemented this part of their API or if I'm doing something wrong?
Thanks for your help.
I'm on the Facebook developer advocacy team and can help answer this for you.
The best way to test this is to use test users. The reason is that we don't send a push notification if we think the person has installed the app. If you use test users, it should work.
Use-case: I sent a request from my game to friend x. Friend x gets a notification in his native Facebook app, taps it and the game opens. If he opens the safari mobile page of Facebook the same notification is never shown.
Is there a way to enable request notifications to appear in the mobile website of facebook?
My game has an Facebook iOS App enabled, the bundle identifier is set and the Store ID is set.
The Facebook App runs in developement Mode.
well what i did to acomplish a similar result... Open my app from a button in an email... is using URL Schemes..
basically everything you need to do is modify your info.plist file and then your are ready to go.
whenever the device sends a request for example myapp:// ... (from a browser, another app, etc.) ... then your app will show up
here is an image with an example.. hope it helps
GL HF