【问题标题】:How to save the friend ID in Facebook TD Friend Selector如何在 Facebook TD 好友选择器中保存好友 ID
【发布时间】:2011-07-28 06:44:51
【问题描述】:

我使用了来自 GitHub 的 Facebook 好友选择器脚本:

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

它工作得很好。但是我不知道如何在 PHP 中保存选择的输出朋友,因为 README 文件文档很差。如果有人能提供帮助,我将非常感谢。

【问题讨论】:

  • 保存在哪里?在数据库中?
  • @KyleBoddy,我只想在 PHP 上输出它。示例:<?php echo "Selected friend id is: $id"; ?>

标签: php facebook selector friend


【解决方案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});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多