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

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.

Related

Facebook iOS invite doesn't reach the invitee

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!

MailCore2 Alternative

I've spent a great deal of time creating an Objective-C based application for the iPhone. I incorporated MailCore2 so that emails could be sent without a dialog popping up (Apple's system of in-app email). My app works perfectly on all of my devices, including all outside devices associated with TestFlight beta testing. Unfortunately, the moment Apple reviews the app, they always reject it, saying that MailCore2 made an AlertView with the contents: "Error! Please connect to the internet or try again later.", and the email never properly sends.
My question is, is there an alternative to MailCore2? I've heard of MailGun, but I see no documentation on their site for either Objective-C or Swift.
Thanks in advance to all who reply.
Mailigun is a services and yes you can send mail with Mailgun, but not receive mail like normal email app. Anyway it is completely different from mailcore (Imap/pop). Mailcore is so hard to use...
If you need only send email i can provide you entirely code for achieve this using mailgun.

Facebook SDK 4.0 iOS Native Only App Invites not received by Test User

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.

Facebook App Invide V4.0 Notification

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.

Send app invite to friend

I want to use facebook sdk (the newest one, 3.5) to send a request to a friend to try out my app. I have got it to work using the code below but no notification is sent to the user. It only shows the request when they go to the "apps" section within facebook. And to make things worse, it seems to only show up in the "apps" section if they go through the desktop site and not the native iOS facebook app.
Can anyone tell me what additional code needs to be added in order for the users to receive the notification inviting them to my app? Thanks!
CODE
[FBWebDialogs
presentRequestsDialogModallyWithSession:nil
message:#"Check out this new app!"
title:#"Amazing new app!"
parameters:nil
handler:nil];
I have the same problem but believe that the answer is as follow.
If you ONLY uses Facebook for iOS and not have a canvas app. It does downprioritize the notifications to only be in applicationcenter. However if you do have Facebook on iOS you will recieve the notification on the normal spot (the globe icon).
If you do have a canvas app as well the notification will be upprioritized on desktop (as it is on desktop you use the canvas) and will be visible in notifications.
I'm just looking for any facebook-source to confirm this but this is what it looks like when I try it out.
EDIT
Solution is confirmed. When I have an Facebook App (canvas) the notification is sent to notifications on desktop. If I don't, it is sent to applicationcenter.

Resources