使用JavaScript SDK在Facebook上使用相同应用程序的朋友列表 [英] Getting list of friends using the same application in Facebook using Javascript SDK

查看:254
本文介绍了使用JavaScript SDK在Facebook上使用相同应用程序的朋友列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常新的Facebook API编码,并试图制作一个游戏应用程序,用户将能够看到谁(在他们的朋友列表)已经在使用游戏应用程序。它非常像所有流行的Facebook游戏,如plock,宠物社会等,用户可以在该应用程序中查看他们的朋友的分数,个人资料和排名。



我已经Google搜索并在这里搜索结果,但大多数方法都使用FBML和REST API,这些API目前不被弃用。我可以找到最好的一个帖子类似于一个这里,它检索完整的朋友列表(这不是我要去的)。



我想知道是否有办法实现我想使用Graph API - > user_games_activity?



编辑:我忘了提到游戏应该集成在Facebook本身中

解决方案

每当用户使用您的游戏时,请确保他们的用户ID位于数据库中,用户数据库表中例如,



然后,随时你需要生成当前用户的玩家的朋友的列表,获取当前用户的朋友的列表 - 请参阅 / me / friends - 并检查是否有任何返回的ID在您的用户表。


I am extremely new to Facebook API codings and am trying to make a game application where users will be able to see who (in their friend list) is already using the game application. It is pretty much like all the popular Facebook games such as plock, pet society, etc. where users can view their friend's score, profile and ranking in the application.

I've Googled around and searched here for results but most of the methods are using FBML and the REST API which are currently being deprecated. The best I can find are all posts similar to the one here which retrieves the full friend list (which is not quite what I'm going for).

I was wondering if there's any way to implement what I want to do with the Graph API -> user_games_activity?

edit: I forgot to mention that the game is supposed to be integrated in Facebook itself

解决方案

Anytime a user uses your game, make sure their user id is in your database, in your users database table for example.

Then, anytime you need to generate the list of the current user's friends who play the game, grab the list of the current user's friends -- see /me/friends -- and check if any of the returned ids are in your users table.

这篇关于使用JavaScript SDK在Facebook上使用相同应用程序的朋友列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆