Facebook SDK升级到OAuth-PHP和Javascript [英] Facebook SDK Upgrade to OAuth - PHP and Javascript

查看:117
本文介绍了Facebook SDK升级到OAuth-PHP和Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据 http://developers.facebook.com/blog/post/503/.解释的更改似乎很容易,将会话引用更改为用户.但是缺少一小部分,下一个" URL参数已由"redirect_uri"替换.我最终获得了无限重定向,直到找到并更改了下一个" URL参数.

I am trying to upgrade our PHP implementation of Facebook SDK for login according to http://developers.facebook.com/blog/post/503/. The changes explained seem easy enough, change session references to user. However there was one small piece missing, the 'next' url param has been replaced by 'redirect_uri'. I ended up with infinite redirects until I found and changed my 'next' url param.

现在,对于Javascript SDK,我注意到我们当前的FB.init和FB.init之间唯一的区别是@ http://developers.facebook.com/docs/reference/javascript/是'oauth:true'的附加内容.所以我将其添加到我们的javascript中并刷新了.当我单击FB like按钮时,我注意到标题没有像PHP SDK那样调用oauth,而是直接进入login.php,这是我认为3.0之前的行为.我们的javascript SDK是否符合oauth的要求?

Now, for the Javascript SDK, I noticed the only difference between our current FB.init and the FB.init explained @ http://developers.facebook.com/docs/reference/javascript/ is the 'oauth: true' addition. So I added this to our javascript and refreshed. When I click the FB like button I noticed that headers are not calling oauth like the PHP SDK does, instead it goes straight to login.php which is what I thought was the pre 3.0 behavior. Is our javascript SDK in compliance with the oauth addition?

此外,在 http://developers.facebook.com的底部有一个注释/blog/post/503/说:所有应用都必须在9月1日之前使用新的OAuth流程."这是否意味着如果我们不升级,我们的FB登录将不再起作用?

Also, there is a note at the bottom of http://developers.facebook.com/blog/post/503/ saying "All apps must utilize the new OAuth flows by September 1." Does this mean that if we don't upgrade our FB logins will no longer work?

推荐答案

感谢您对'next'和'redirect_uri'参数的反馈;我们将研究更新文档.

Thanks for the feedback about the 'next' and 'redirect_uri' parameters; we'll look into updating the documentation.

关于OAuth符合性,只要您是从 http://connect.facebook.net ,例如 http://connect.facebook.net/en_US/all.js 符合适当的标准.

Regarding OAuth compliance, as long as you're loading the JS SDK from http://connect.facebook.net, e.g. http://connect.facebook.net/en_US/all.js you'll be in compliance with the appropriate standards.

关于第二点-您必须在10月1日之前迁移到开发人员路线图.在这段时间之后,您的FB登录将失败并显示错误.

Regarding your second point - you have until October 1 to migrate to OAuth 2.0 as described on the Developer Roadmap. After this time, your FB logins will fail with an error.

这篇关于Facebook SDK升级到OAuth-PHP和Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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