Invite Facebook friends to my iOS app that is not a game with custom UI

我只是一个虾纸丫 提交于 2019-12-08 11:03:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!