IOS - Facebook how to invite friends to download app? - iphone

I have an Ios app , i'm trying to implement this flow:
User click a button->a list of my facebook friends appears-> i select one or more friends-> to each of this friends the app sends an invite to download the app from store-> i count and save locally the number of friends invited.
I have read documentation and the FBSDKAppInviteDialog seems to be the right choose. I have implement this solution and then i have discover this:
In ios 9 i can't switch in the fb app during the login
I can't know how many friends i have invited
The safariviewcontroller can't dismiss after an invite
The documentation is invisible
and maybe so on...
I have removed this FBSDKAppInviteDialog, it can't be a solution.
After hours i'm very frustrating, anyway i have see the candy crush app. It can send invites in in web browser,facebook app,mobile browers and it can select multiple facebook friends. Anyone know how achive the same result? I can replicate with Graph?

In ios 9 i can't switch in the fb app during the login
This is expected behavior, on iOS9, the Facebook SDK will fallback to a SFSafariViewController based approach for most of the dialogs
I can't know how many friends i have invited
As far as I know, the dialogs never supported this.
The safariviewcontroller can't dismiss after an invite
This seems to be a functionality SFSafariViewController doesn't support (dismissing it from within the loaded page).
The documentation is invisible
The documentation for the FBSDKAppInviteDialog works fine for me (https://developers.facebook.com/docs/app-invites/ios). If this is not working for you, it'd be a good idea to file a bug report at https://developers.facebook.com/bugs so Facebook can look into it and fix any bugs that might be present

Related

Facebook App Invite Links not working

I'm trying to setup app invites. Basically I want users to invite their facebook friend to try and install my app. I did setup app links in facebook. This is what I did
What I'm doing wrong? Instead of play store url, i tried putting my app url, but not working. I read the FB documents, it's so confusing, I'm not clear on what is what.
Also, what is the below is for? I belive it's for deep linking. Is that correct? I don't want deep linking for now. Now I only want users to invites their FB friends and when they click on the invite, it should take them to android store
I faced with this problem before.
Go to your app setting then define your app "namespace". Afterthat, your app invite will works.

App requests successful, but no notification shown

I am using the normal setup for sending invites through the requests dialogue:
FB.ui(
{
method: 'apprequests',
message: "Please add me, I am doing the same, thanks!"
},
function(response) {
console.log(response);
}
);
The response is successful, response.to shows multiple ids. So sending these invites works like it should. The problem is that these apprequests are not shown up as notifications like they usually do, instead the only place to find them here.
Has the API changed? Looking for answers has given me no results, though I did find this bug report from February 15th 2013.
Is Facebook just testing yet again, or has the API changed but not the documentation? I am truly grateful for any insights!
There's two simple things that might cause that problem.
One is that you application is missing the Canvas. Just add it from the your App panel in Facebook Developers.
The second one - make sure your app is NOT in SandBox Mode. If it is it won't send any notifications. I lost hours before figuring that out and changing the code in all possible ways.
Hope that helps.
Its not facebook bug its a problem in your facebook app configuration :
Follow the below configuration and its working like a charm.
You just need to go in to the Facebook developer and select your app and goes in to the setting of your app and click "Add Platform" and select "App On Facebook" and than add canvas url in it. now try to send invitation and it will show the notification.
Thanks
Sagar
or go to facebook developers,
Change 111 to your APP ID
-Fedmich
This was posted yesterday in facebook bugs site.
However, it is still not working for me even though I'm utilizing the exact code that the FB comment is referencing.
I realize this is not complete answer to the question and should be put in the comments. However I am a newbie and don't have enough reputation on StackOverflow to post comments. Emil, could you please let me know if you resolve this issue.
Had same issue, I added Secure Canvas URL, etc. But problem was I haven't provided iPhone Store ID inside iOS section in Settings.
As of Graph API 2.3, Game requests are only available to games.
As mentioned in Game Requests description, you have to create Facebook Web Games in App Portal, then you will get the notification with Game Request. Not for website anymore.
I had to implement facebook ‘apprequests’ instead of the deprecated ‘appinvites’ in an existing cordova app and spent hours debugging.
‘apprequests’ are only available in Facebook Apps categorized as ‘games’.
You can send notifications only to platforms (iOS, Android, Facebook web games) that are involved with the facebook app. That means, you will never receive a notification in your browser if you miss ‘facebook web games’ as platform. My expectation was to be notified in the facebook browser app if I was invited from a Mobile app.
iOS devices don’t get notifications.
In my case, I’ve missed to fill the app store id in the Facebook app platform configuration. After that, notifications appeared instantly.
If you like notifications in the fb browser app, you have to add ‘Facebook web games’ (formerly known as ‘canvas’) as plattform.
You can save yourself a lot trouble by creating test users in the app role category of your facebook app.

Ability to tag friends in a facebook native share dialogue

I am using the Facebook iOS SDK 3.1 in my latest, and I'm using the native share dialogue from FBNativeDialogue.
It has a "friends" button in the corner, which I always throught was to tag friends (just like the location button tags the location), but I realised that this is privacy settings for the post.
Therefor, Im still confounded how you can tag friends in a post. Nothing seems to happend when i type # followed by my friends names, is this not implemented yet ? And does anyone know of clever way to implement this ?
What the customer wants is the similar to the "Who are you with?" button as shown here:
I just don't think this is possible, considering the current Facebook SDK (3.5.1) documentation -- https://developers.facebook.com/docs/howtos/ios-6/#nativepostcontroller. It states:
iOS 6 includes a native Share Sheet that lets users post status updates, photos, links, and locations to Facebook and includes support for setting the audience for the post and tagging the post with a location.
Even when you post something on Facebook from iOS' Notification Center, it only allows you to share the information mentioned above, without tagging friends.
Instead, you could use the Facebook views, as they do here https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/show-friends/. But if you have to use the Native Dialogs, I can't see a way. If you get it to work, please let us know the solution.

How can I use the facebook connect api for the iphone to to invite friends to an application or send a message

In my iPhone application, I wanted to add the function of signing into Facebook and letting a friend know about the app. I know how to sign in and get the friends list, but I cannot find a good way of inviting a friend. So far, I haven't been able to come up with a way to invite a friend (I don't think one can with the iphone facebook sdk yet) or send a message to the inbox. Is there a way to do either of these? If not are there any better options I haven't thought of? Thank you for any advice.
checkout this tutorial. i used it to get the facebook header files sorted out. Once thats done, everything should be in place for you to send a message easily :
http://www.mobileorchard.com/marketing-in-code-part-2-setting-a-users-status-in-facebook-from-an-iphone-app-a-tutorial/
check out This post.it shows what camn we do with facebook api

Iphone and Facebook Connect?

Does anybody know if you can actually pull done messages/comments from facebook into an iPhone app? Every app I see in the app store allows you to post to facebook. I have an app idea that includes actually seeing your friends messages and wanted to see if the SO community has seen anything like this before or if you are able to do this.
Yes, you should be able to do this; FBConnect lets you call all of the Facebook APIs, so you'd want to look at http://wiki.developers.facebook.com/index.php/Stream.get or http://wiki.developers.facebook.com/index.php/Comments.get. I haven't done anything with comments directly, but I do have an app that retrieves lists of friends, photo albums, and photos on the iPhone using FBConnect so I think this would be very similar, and it wasn't that hard to do.