最新的 Facebook PHP API 是什么?
看起来应该是 https://github.com/facebook/php-sdk/ 。但是,我对此表示怀疑,因为 getLoginUrl
方法生成的不是 http://developers.facebook.com/docs/authentication/
中描述的 URL 类型。
所以我想知道其中哪一个已经过时了?
Seemingly it supposed to be https://github.com/facebook/php-sdk/
. However, I am suspicious either it so because getLoginUrl
method generates not the type of URL that is described in http://developers.facebook.com/docs/authentication/
.
So I was wondering which of these is outdated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您链接的 PHP SDK 是最新的。它是各种 Facebook API 的客户端,包括 Graph API、“旧”REST API 等。现在, getLoginUrl() 确实生成了一个 URL,该 URL 的使用时间比 OAuth 文档存在的时间还要长,但最终结果对您来说是相同的。如果由于某种原因您的登录 URL 确实存在问题,您可以通过替换或扩展现有 SDK 逻辑以任何您喜欢的方式实现身份验证。
请记住,API 和 SDK 不是同一件事。 PHP SDK 只是一种 API 客户端。 FB 官方文档中的所有内容都应该被认为是最新的,因为它们今年都进行了修改。
The PHP SDK that you linked is up to date. It is a client for the various Facebook APIs, including the Graph API, the "old" REST API, and others. Right now, getLoginUrl() does generate a URL that has been used for longer than the OAuth documentation has existed, but the end result will be the same for you. If you do have a problem with that login URL for some reason, you're free to implement authentication any way you like by replacing or extending the existing SDK logic.
Remember, APIs and SDKs are not the same thing. The PHP SDK is just one API client. Everything in the official FB docs should be considered up-to-date, as they've all been revamped this year.
基于 OAuth 的身份验证和数据 Graph Api 是最新的。
http://developers.facebook.com/docs/authentication/
另请参阅:
http://developers.facebook.com/docs/reference/rest/
OAuth based authentication and Graph Api for data are the latest ones.
http://developers.facebook.com/docs/authentication/
see this also:
http://developers.facebook.com/docs/reference/rest/