Using the Graph API with Facebook SDKs

Facebook SDKs have built-in methods and objects to get data in and out of the Graph API.

Android SDK

With the GraphRequest and GraphResponse classes, you can make requests and get responses in JSON asynchronously. You can also make batch requests to the Facebook servers with GraphRequestBatch.

See the Android SDK - Calling the Graph API documentation for more information.

iOS SDK

The iOS SDK uses the FBSDKGraphRequest and FBSDKGraphRequestConnection classes to work with the Graph API. You can also make batch requests to the Facebook servers by constructing multiple requests and adding them to the same FBSDKGraphRequestConnection.

See the iOS SDK - Calling the Graph API documentation for more information.

JavaScript SDK

The JavaScript SDK uses the FB.api() method to read or write data to the Graph API.

See the JavaScript SDK - Calling the Graph API documentation for more information.

React Native SDK

Graph API requests are made using the GraphRequest and GraphRequestManager classes, which are loaded from the react-native-fbsdk module.

See the Facebook Graph API for React Native docmentation for more information.

PHP SDK

The PHP SDK uses the FacebookRequest and FacebookResponse classes to work with the Graph API.

See the PHP SDK on Github for more information.

tvOS SDK

The tvOS SDK accesses the Graph API in the same way as the iOS SDK.

See the Graph API with tvOS documentation for more information.

Unity SDK

The Unity SDK uses the FB.API class to work with the Graph API. It has two signatures: one for passing a collection of argurments and another for passing more complicated data.

See the Unity SDK - FB.API reference for more information.