Facebook API - 应用程序请求 - 邀请好友过滤器

发布于 2024-12-11 08:13:04 字数 341 浏览 0 评论 0原文

我在从 Facebook 应用程序邀请好友时发现了几个好友过滤选项。

我在 sim 社交上看到的“喜欢游戏”背后的逻辑是什么,

还在 Zynga 邀请中发现了更多内容:

  1. 推荐朋友

  2. 我的活跃Zynga朋友

无法找到这背后的任何逻辑。我使用 graph 和 FB.ui api 构建了一个自定义好友邀请插件。在这里,我的客户想提供一些像我上面提到的过滤器。

有人可以帮我解决这个问题吗?

谢谢 彼得

I have found several friends filter option while invites friends from facebook App.

What will be logic behind "LIKES GAMES" that I saw at the sim social

also found some more on Zynga invites :

  1. Recommended friends

  2. My Active Zynga Friend

Not able to find any logic behind this. I build a custom friends invite plugin by using graph and FB.ui api. Here my client want to give some filter like I mentioned above.

Can someone help me on this?

Thanks
Peter

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半枫 2024-12-18 08:13:04

从我的角度来看,为邀请对话框创建一个过滤器(就像 The Sim Social 游戏中的过滤器一样)是这样完成的:

  1. 首先,通过请求 user_likes 和friends_likes 权限,让您的应用程序需要访问他们的“喜欢”和“朋友的喜欢”
  2. 拨打电话对于每个朋友来说,像这样的图形 API https://graph.facebook.com/_friends_ids_/likes?access_token=_valid_acess_token_
    这将为您提供如下信息:

    <前><代码>“数据”:[
    {
    "name": "秋千设施,西班牙语\u00f1ol",
    "类别": "网站",
    "id": "277416935626207",
    “创建时间”:“2011-10-21T11:14:06+0000”
    },
    {
    "name": "Frontier Ville Friend Finder",
    "category": "游戏/玩具",
    "id": "127903637247191",
    “创建时间”:“2010-11-03T21:31:06+0000”
    }
    ]
    }

  3. 通过这种方式,您可以获得所有朋友喜欢的信息,现在您只需查找要为其创建过滤器的“喜欢”名称或类别,并将这些朋友 ID 保存在数组中

请求的过滤器参数对话框将类似于

[{name: 'Filter name', user_ids: [1, 2, 3]}, {name: 'Other filter name', user_ids: [4,5,6]}]

“To”使用户能够选择他们希望向谁发送请求,您可以调用请求对话框,如下所示。

function sendRequestToManyRecipients() {
  FB.ui({method: 'apprequests',
    message: 'My Great Request',
    filters: [{name: 'Filter name', user_ids: [1, 2, 3]}, {name: 'Other filter name', user_ids: [4,5,6]}],
  });
}

有关更多信息,我建议您阅读请求对话框

我希望这对您有帮助。

From my point of view, making a filter for the invite dialog like the one from The Sim Social game is done this way:

  1. First make your app require access their likes and friend likes by asking for the permissions user_likes and friends_likes
  2. Make calls to the graph api like this one for every friend https://graph.facebook.com/_friends_ids_/likes?access_token=_valid_acess_token_
    This will give you info like:

    "data": [
      {
         "name": "Swing Facil, en espa\u00f1ol",
         "category": "Website",
         "id": "277416935626207",
         "created_time": "2011-10-21T11:14:06+0000"
      },
      {
         "name": "Frontier Ville Friend Finder",
         "category": "Games/toys",
         "id": "127903637247191",
         "created_time": "2010-11-03T21:31:06+0000"
      }
       ]
    }
    
  3. This way you can get all the friends likes info, now you just have to look for the 'like' name or category you want to make the filter for and keep those friend id's in an array

The filter param for the request dialog will be something like

[{name: 'Filter name', user_ids: [1, 2, 3]}, {name: 'Other filter name', user_ids: [4,5,6]}]

To enable the user to select who they wish to send a request to, you can invoke the Request Dialog as below.

function sendRequestToManyRecipients() {
  FB.ui({method: 'apprequests',
    message: 'My Great Request',
    filters: [{name: 'Filter name', user_ids: [1, 2, 3]}, {name: 'Other filter name', user_ids: [4,5,6]}],
  });
}

For more info, i recommend you to read Requests Dialog

I hope this help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文