Facebook app request information

北城以北 提交于 2019-12-08 11:56:10

问题


I am creating a Facebook app that uses apprequest so players can invite their frineds to play aswell. I want to be able to award points to players when people they have invited accept their invitation and start using the app too. I can retreive the request_id from the new player accepting the the invitation, is there a way I can then use this request_id to get the user id of the player that sent the apprequest?


回答1:


For anyone else who might have a similar problem and doesn't want to spend hours working their way through the Facebook documentation have found this can be done quite simply with just a couple of lines of code:

    $ret = $facebook->api("/$request_id", 'GET');
    $inviterId = $ret['from']['id'];

Hope it helps someone.




回答2:


yes http://developers.facebook.com/docs/reference/dialogs/requests/



来源:https://stackoverflow.com/questions/7662011/facebook-app-request-information

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