查找哪些用户的朋友也使用我的 Facebook 应用程序

发布于 2024-11-03 09:35:24 字数 1019 浏览 3 评论 0原文

我已经看过有关此问题的其他答案,但有一些不同的问题。

我是 Facebook 开发新手,所以请耐心等待,但我正在创建一个 Android 应用程序并想使用 Facebook。我想找出当前用户的哪些朋友也使用我的应用程序,我已经实现了一种方法来执行此操作,但我认为它不是最有效的,甚至不是 Fb ToS 允许的。

到目前为止,每次用户与我的应用程序交互时,他们的 uid 都会发送到我自己的数据库,该数据库要么添加 uid,要么只是检查它是否已经存在。当用户想要查找使用该应用程序的其他朋友时,嵌套循环会通过用户朋友的 uid 与我的数据库中的 uid 进行比较,并以这种方式找到它们。对于相当多的用户和朋友来说,这需要几秒钟的时间,所以我不敢想象如果我的应用程序成功需要多长时间。

我现在想要另一个数据库表来存储使用该应用程序的朋友的 uid,因此当发生上述循环时,用户的 uid 和所有使用应用程序的朋友的 uid 一起存储在一个表中,这会让它变得更复杂当用户再次执行“朋友搜索”时速度会更快,因为他们的许多朋友已经被认为是用户。

我的问题是我不知道 Facebook ToS 是否允许这样做?我可以保留uid吗?如果是这样,我是否可以按照我的建议保留 uid 之间的关系?

我知道您可以执行 FQL 查询来比较朋友与使用该应用程序的用户,但我使用的 Android Facebook SDK 称为 Easy Facebook Android SDK 出于某种原因将 FQL 查询返回为 XML 而不是 JSON(即使查询末尾有“&format=json”:-/),而且我并不是 XML 的真正粉丝,也不喜欢不想乱搞SAX(如果我不需要的话),因为我在我的方法中使用 JSON,因为我已经在我的应用程序中为其他事情实现了 ​​JSON。

我还了解 REST API 方法 getAppUsers(),但不想使用它,原因很简单,它是遗留的,可能随时被弃用。

感谢您阅读所有这些苦差事:-)

希望您能提供帮助,

Infinitifizz

I've seen the other answers about this but have a few different questions.

I'm new to Fb Development so bear with me but I am creating an Android app and want to use Fb. I want to find out which of the current user's friends also uses my app, I have implemented a way to do this but I don't think it is the most efficient or even allowed by Fb ToS.

So far, everytime a user interacts with my app, their uid is sent to my own db which either adds the uid or just checks that it's already in there. When the user wants to find other friends that use the app, a nested loop works through the user's friends' uids comparing with the uids in my db and finds them that way. This takes a few seconds with quite a few users and friends so I dread to think how long it would take if my app was successful.

I am now wanting to have another db table that stores uids of friends that use the app, so when the above looping occurs, the user's uid and all their app-using friends' uids are stored in a table together, this would make it much quicker when the user performs the "friend search" again, as many of their friends will already be known to be users.

My question with this is that I don't know if this is allowed by Fb ToS? Am I allowed to retain uids? And if so, am I allowed to retain relationships between uids as I propose?

I know that you can do FQL queries to compare friends with users that use the app but the Android Facebook SDK I am using called Easy Facebook Android SDK for some reason returns FQL queries as XML rather than JSON (even though the query has "&format=json" on the end :-/) and I'm not really a fan of XML and don't want to be messing around with SAX if I don't need to, as I am using JSON for my method because I already have JSON implemented in my app for other things.

I also know about the REST API method getAppUsers() but don't want to use this for the simple reason that it is legacy and could be deprecated anytime.

Thanks for reading all this drudge :-)

Hope you can help,

Infinitifizz

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

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

发布评论

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

评论(1

半衬遮猫 2024-11-10 09:35:24

关于FB政策,我不认为你违反了它们。最多,您需要将其添加到您的隐私政策中:

3.您将制定一份隐私政策,告诉用户您将使用哪些用户数据以及您将如何使用、显示、共享或传输该数据,并且您将在开发者应用程序中包含您的隐私政策 URL。

4.用户朋友的数据只能在用户在您的应用程序上的体验上下文中使用。

(...)

7.您不得将 Facebook 用户 ID 用于应用程序之外的任何目的(例如,构建和运行应用程序所需的基础设施、代码或服务)。 Facebook 用户 ID 可以与您用来构建和运行应用程序的外部服务一起使用,例如网络基础设施服务或分布式计算平台,但前提是这些服务是运行您的应用程序所必需的,并且该服务与您对 Facebook 用户 ID 保密。

但是,查看该库,似乎他们正在使用已弃用的旧 REST API(即 URL https://api.facebook.com/restserver.php?method=fql.query ... 而不是 https://api.facebook.com/method/fql.query?...

我要么 (1) 联系他们看看他们是否会更新尽快使用该库或 (2) 使用另一个库(例如 android-facebook-sdk)。

Regarding to FB policies, I do not think you are breaking them. At most, you will need to add it to your privacy policies:

3 . You will have a privacy policy that tells users what user data you are going to use and how you will use, display, share, or transfer that data and you will include your privacy policy URL in the Developer Application.

4 . A user's friends' data can only be used in the context of the user's experience on your application.

(...)

7 . You will not use Facebook User IDs for any purpose outside your application (e.g., your infrastructure, code, or services necessary to build and run your application). Facebook User IDs may be used with external services that you use to build and run your application, such as a web infrastructure service or a distributed computing platform, but only if those services are necessary to running your application and the service has a contractual obligation with you to keep Facebook User IDs confidential.

But, looking at that library, it seems that they're using the old REST API that is being deprecated, (i.e.., URL https://api.facebook.com/restserver.php?method=fql.query... instead of https://api.facebook.com/method/fql.query?...)

I would either (1) contact them to see if they will update the library soon or (2) use another library (such as the android-facebook-sdk).

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