How to get your apps ready for Facebook’s OAuth 2.0 upgrade

September 16th, 2011 By nFriedly

I just finished a writeup on the necessary JS changes to support Facebook’s OAuth 2.0 upgrade, and then Hilary did a followup post on the server-side.

The upgrade enabled right now, but it gets forced out on October 1st. These two posts should give you all you need to know to get your site ready for Facebook’s upgrade:

Part 1: JavaScript - JavaScript changes for Facebook’s OAuth 2.0 upgrade

Part 2: PHP / Backend – Server Side changes for Facebook’s OAuth 2.0 upgrade

Also worth noting, there’s a lot of good information on Facebook’s Developer Blog.

9 Responses to “How to get your apps ready for Facebook’s OAuth 2.0 upgrade”

  1. Cindy says:

    I think it is great you went through all this work to get out this information seen about the new OAuth 2.0… But no one is letting a laiman like myself figure out how to get the job done. It seems to be quite not user friendly.
    I wish someone would give me the directions/instruction on the motions I must go through to accomplish this task.
    More so, with all the changes Facebook just did and are implemented on my page/wall already, I can’t even tell if this is the OAuth 2.0 already accomplished.

    Can you help me understand this better?

    Thank you, Cindy

  2. nFriedly says:

    Hi Cindy,

    The work Hilary and I did is aimed more at developers who work with FB on a regular basis, but I might still be able to help.

    The new wall / profile is mostly unrelated to the OAuth 2.0 stuff, in that you don’t need to do anything for the new wall/profile – FB does all the work there.

    However if you built any apps on facebook then you almost definitely need to upgrade, and if you have any FB stuff on your website, then you may need to upgrade. (iframe-based Social Plugins do not need to be upgraded – they’ll get the new system automatically, but FB Connect / SDK based things most likely do need some work.)

    If you’re not sure about your app/website, leave a link here and I’ll try and get you started in the right direction.

  3. otomoshinja says:

    Please tell me the direction on how to upgrade apps to OAuth 2.0 and HTTPS just like FB told me on my wall. I really don understand how it is done. Please make the instruction easy and detail. Thank you very much.

  4. nFriedly says:

    Hi there,

    On the JavaScript side, it’s almost entirely find-and-replace, and the first article covers that pretty thoroughly.

    The server-side however has a number of different options and the upgrade path is different depending on your workflow and technology. This is the basic flow: https://developers.facebook.com/docs/authentication/ – our second article above covers a few details that that guide misses.

    But, without any information about your site / app, I can’t really give you much more help.

  5. Cynthia says:

    Hi,
    I am a developer, for landing pages on the most part.. the OAuth 2.0 upgrade is freaking me out a bit..
    I have looked at the linked pages as well, and understand some of it, but still need a bit more guidance.
    My Facebook application is located here (it’s my welcome page)
    https://www.facebook.com/SacredCynShop?sk=app_192635030770150

    Any help would be greatly appreciated, I just want to make sure I don’t have my landing page designs disabled. Thank you!

  6. nFriedly says:

    Hi Cynthia, it looks like you are only using the basic FB.Canvas features and not requiring the user to grant your app any access to their information, so I don’t think you’ll need to change anything.

    To be extra sure though, you can edit your FB.init() javascript and add the oauth: true option. It currently looks like this:

    FB.init({
    appId : '192635030770150',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml : true // parse XFBML
    });

    After the change, it should look like this:

    FB.init({
    oauth: true, // turn oauth on right away instead of waiting for the 10/1/2011 deadline
    appId : '192635030770150',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml : true // parse XFBML
    });

    And then test out your page. If everything still works, then you’re all set!

  7. venkat says:

    hai all, i dont understand how to upgrade my facebook apps to oauth 2.0. my apps is desktop application. please share to me how to solve and ready to work.

  8. nFriedly says:

    Hi venkat, I’m not sure for desktop applications. You might be able to find some good information on FB’s OAuth 2.0 Migration guide: https://developers.facebook.com/docs/oauth2-https-migration/ and also on their developer blog: https://developers.facebook.com/blog

    Also worth mentioning, while FB originally stated that they were going to cut off the older auth methods and only allow OAuth 2.0 after October 1st, they missed their own deadline, at least for the JS SDK, and they haven’t announced a new one yet.

Leave a Reply

 


RSS nFriedly Web Development » Technical Blog