Facebook SDK Upgrade to OAuth - PHP and Javascript

不问归期 提交于 2019-12-10 10:43:16

问题


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.

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?

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?


回答1:


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

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.

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.



来源:https://stackoverflow.com/questions/7262936/facebook-sdk-upgrade-to-oauth-php-and-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!