javascript - facebook friend invites - who sent invitation -


i have app each user can invite friends join app.

i have done via js fb sdk.

i use php sdk server sessions , other things.

now questions how can determine id of inviter when user joins app based on invitation sent?

eg: let's user-x invites user-z join app. user-y invites user-z join app too. user-z joins through link of user-x. want reward user-x because brought new user app, need fbid or something. how can determine referer?

i have used code implement facebook friends invite on website:

<script src="https://connect.facebook.net/en_us/all.js"></script> <script type="text/javascript">  fb.init({   appid:'<?=appid?>',   cookie:true,   status:true,   xfbml:true  });   function fbinvite(){   fb.ui({    method: 'apprequests',    message: 'invite facebook friends'   },function(response) {    if (response) {     alert('successfully invited');    } else {     alert('failed invite');    }   });  } </script> 
<a href="#" onclick="fbinvite();">open invite popup</a> 


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -