Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do we know which graph api version we are using from the SDK

Once in a while, we get this email from Facebook about a graph API is about to be deprecated.

We are using both the iOS SDK and Android SDK in our apps.

  • https://developers.facebook.com/docs/ios/graph
  • https://developers.facebook.com/docs/android

I know the SDK use the graph API internally, but I find it tricky to tell which version of the graph API we are using from the SDK.

Is there a way to tell which graph API version we are using given the SDK version number?

like image 977
Yuchen Avatar asked Mar 29 '18 13:03

Yuchen


People also ask

How do I find the API version on a graph?

The API version is listed with the release of each version of the Facebook SDK for Android. Much like the JavaScript SDK, the version is prepended to any calls you make to the graph API through the Facebook SDK for Android.

What is version in API?

API versioning is the practice of transparently managing changes to your API. Versioning is effective communication around changes to your API, so consumers know what to expect from it. You are delivering data to the public in some fashion and you need to communicate when you change the way that data is delivered.

Is Facebook Graph API deprecated?

API Version Deprecations: As part of Facebook's Graph API and Marketing API, please note the upcoming deprecations: August 3, 2021: Graph API v3. 3 will be deprecated and removed from the platform. August 25, 2021 Marketing API v9.


2 Answers

For iOS, if you are not calling the method named + (void)setGraphAPIVersion:(NSString *)version anywhere in the project, you should be using the version defined with FBSDK_TARGET_PLATFORM_VERSION. You can find it in FBSDKCoreKit.h file as below:

enter image description here

Or:

You can also try to log [FBSDKSettings graphAPIVersion];

like image 177
Okhan Okbay Avatar answered Oct 08 '22 09:10

Okhan Okbay


I think this can help you, because in this changelog it is written that in which SDK version which GRAPH API version was used.

  • versions >= 5: https://github.com/facebook/facebook-android-sdk/blob/master/CHANGELOG.md
  • versions <5: https://developers.facebook.com/docs/android/change-log-4x
like image 34
Aniruddh Agarwal Avatar answered Oct 08 '22 08:10

Aniruddh Agarwal