问题
I want to invite Facebook friends the way Rounds iOS app work (i.e. show the list of Facebook friends in native UI and once the user taps 'Send Invites', i show the Request Dialog with the select friends and the user only press send to send the invites). This can be done using
FBWebDialogs.presentRequestsDialogModallyWithSession(
nil,
message:"Message",
title:nil,
parameters:["app_id" : APP_ID, "to" : FRIENDS_IDs]) {
result, url, error in
//Do whatever
}
The problem here is that the only two ways i can use to get the friend ids is:
1- making a graph request using /me/invitable_friends
which is avaiable only for games.
2- the other is to use /me/friends
BUT it returns only the friends that have authorized your app not the complete list of friends.
What i want to do is already done in another app called Rounds and also it is not categorized as game.
回答1:
https://developers.facebook.com/docs/apps/faq#invite_to_app
You are supposed to use the Message Dialog on iOS to invite friends. There is no need to get the whole friendlist for that, the user can just select his friends in the Dialog. You can´t get the whole friendlist anyway if your App does not have a Canvas implementation and if your App is not a game. Of course there´s also taggable_friends
, but that one is for tagging only.
Btw, those other Apps where this works are most likely old v1.0 Apps. It will stop working for them after April 2015.
来源:https://stackoverflow.com/questions/28633660/invite-facebook-friends-to-my-ios-app-that-is-not-a-game-with-custom-ui