views:

14

answers:

1

On page http://developers.facebook.com/docs/reference/rest/, it says

Note: We are currently in the process upgrading our core server API from the old REST API to the more modern Graph API. Most of the methods required for canvas applications to integrate with Facebook have not yet been upgraded to the new API. For the time being, we recommend you continue using the old REST API in canvas apps instead of the new APIs for the sake of completeness.

But the only available PHP SDK I have seen is http://github.com/facebook/php-sdk but it uses getSession() and api('/me'), so it looks like it is the Graph API. The REST Api I remember actually had require_login() but that SDK is no where to be found. Does someone know what is going on?

+1  A: 

You can still use the old REST API with the new PHP SDK, all you have to do is set the method parameter in your call. Something like this:

$facebook->api(array(
    "method"=>"users.getInfo",
    "uids"=>$fbID,
    "fields"=>array("pic","pic_square")));

You should be using the graph API despite with the documentation says (its outdated). The onyl time you need the old REST API is to make the few calls that can't be done via the graph API.

As far as the getSession() method is concerned, you definately need to be using the new authentication methods as outlined in the facebook documentation (all new applications should use OAuth2.0).

BeRecursive
you know which call can't be called using graph api? is the old SDK available at all?
動靜能量
The old SDK is deprecated don't use it. Any REST API call can still be called using the new SDK. Methods such as `fql.query` can only be made using "method"=>"fql.query"
BeRecursive

related questions