“新” restfb 与“旧”脸书API

发布于 2024-09-10 05:23:26 字数 450 浏览 9 评论 0原文

对于新的 J2EE Facebook Connect 项目,您是否推荐:

这些要求几乎涵盖了 Facebook Connect 支持的所有内容。

完整性、易用性、稳定性等都很重要。但对我们来说最重要的是所选图书馆蓬勃发展并最终成为获胜者的可能性(如果有的话)。

谢谢。

For a new J2EE Facebook Connect project, do you recommend:

The requirements cover pretty much everything supported by Facebook Connect.

Completeness, ease of use, stability, etc are important. But what matters the most to us are the odds that the selected library flourishes and ends up being the winner, if there is such at thing.

Thank you.

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

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

发布评论

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

评论(2

蒗幽 2024-09-17 05:23:26

使用新的基于 OAuth2 的授权流程Graph API,SDK 所做的“工作”量已大大减少。我建议您选择一个不会尝试提供非常高级抽象的库,而是理解并利用您正在进行 HTTP API 调用的事实(例如,用于 HTTP 的并行化)要求)。我们最近发布了一个 Android SDK,虽然与您的问题无关,但可能是一个不错的选择参考点。

With the new OAuth2 based authorization flow and the Graph API, the amount of "work" an SDK does has been greatly reduced. I'd suggest that you choose a library that does not try to provide very high level abstractions, and instead understand and leverage the fact that you're making HTTP API calls (for instance, for parallelization of HTTP requests). We recently released an Android SDK which while not related to your question, may be a good point of reference.

讽刺将军 2024-09-17 05:23:26

为了充分披露,我maven RestFB 并拥有该项目的提交权。也就是说,前段时间我也处于同样的情况,需要一些 Java 库来使用 FB 的 Graph API。最初,我尝试了 facebook-java-api,但它不支持所有较新的 API。当时我深入研究了代码,发现一些固有的不灵活性使得做我需要的事情变得过于复杂,所以我四处寻找替代方案。平心而论,对 facebook-java-api 来说,也许我只是在一个糟糕的时间发现了它们(大约 6 个月前,当时只有 2.x 的小幅更新,而且当时还看不到 3.x。我看到他们已经最近发布了 3.0.2)。

不管怎样,我后来找到了 RestFB。我从一开始就喜欢它的是代码的简洁性和可扩展性,并且不需要任何额外的依赖项。基本的 Graph API 对象是内置的,创建新对象非常简单。有一两个小问题无法开箱即用,所以我提出了问题,RestFB 项目的创始人 Mark Allen 似乎对修复这些问题非常敏感,所以我坚持使用它。最近,我向该项目贡献了 Maven 构建,因为我热衷于在 Maven Central 上看到 RestFB 库,以便自己更轻松地使用它们。

For full disclosure, I mavenized RestFB and have commit rights to the project. That said, I was in the same position some time ago, needing some Java library for working with FB's Graph API. Originally, I tried out facebook-java-api, but it didn't support all the newer APIs. I peaked into the code at the time and saw some inherent inflexibility that made it overly complicated to do what I needed so I looked around for alternatives. In all fairness to facebook-java-api, perhaps I just caught them at a bad time (around 6 months ago, there were only minor updates to 2.x and no 3.x in sight at the time. I see they've released 3.0.2 recently).

Anyhow, I then found RestFB. What I liked about it from the very beginning was how clean and extensible the code was and that it didn't require any extra dependencies. The basic Graph API objects are built-in and it's very simple to create new ones. There were one or two minor things that didn't work out of the box, so I opened issues and Mark Allen, the founder of the RestFB project, seemed pretty responsive with fixing them so I stuck to using it. More recently, I contributed Maven build to the project since I was keen on seeing the RestFB libs on Maven Central to make it easier for myself to use them.

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