Just finished upgrading our facebook SDKs for work and ran into some issues. I wanted to repost them here in case anyone runs into the same issues.

When googling the topic of how to upgrade Facebook’s PHP SDK the top result was http://developers.facebook.com/blog/post/503/ , so I started reading and the changes appeared to be minor. Simply change the references from “session” to “user”.

After making the necessary updates in code and using the 3.0 version of the Facebook PHP SDK files I started to run into infinite redirect issues. in version 2.x the ‘next’ param was used, but in 3.0 it appears they replaced it with ‘redirect_uri’. Once I renamed ‘next’ to ‘redirect_uri’ everything worked as expected.

As far as the JS SDK is concerned it appears that as long as you require the correct .js library you will be using the new SDK.

You can view the original question and responses @ http://stackoverflow.com/questions/7262936/facebook-sdk-upgrade-to-oauth-php-and-javascript .

— Edit (9.1.2011)

Be AWARE! When upgrading from 2.x to 3.x Facebook changed the ‘req_perms’ to ‘scope’. If you do not change your param for generating loginUrl you will not get access to user’s sensitive information such as email address.