2011-07-28 113 views
0

我用這個Facebook好友選擇腳本從GitHub:如何保存的朋友ID在Facebook的TD朋友選擇

http://playground.thesedays.com/tdfriendselector/

和它完美的罰款。但是我不知道如何將所選的輸出朋友保存在PHP中,因爲README文件文檔非常差。如果有人能夠協助,我會非常感激。

+0

將它保存在哪裏?在數據庫中? –

+0

@KyleBoddy,我只想在PHP上輸出它。例如:'<?php echo「選擇的朋友ID是:$ id」; ?>' –

回答

1

當您創建實例時,請添加callbackSumbit選項以及您想要使用的函數。

例如:

//the function we want to use as event listener on submission 
alertFriends = function(selectedFriendIds) { 
    //whatever you want to do with the array of FB Friend Ids 
    alert('I got them'); 
} 

mySelector = TDFriendSelector.newInstance({callbackSubmit : alertFriends});