Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facebook api version used in facebook android sdk

I'm getting the following alerts on Facebook Developers:

'MyApp currently has access to Graph API v2.2 which will reach the end of its 2-year lifetime on 27 March, 2017. To ensure a smooth transition, please migrate all calls to Graph API v2.3 or higher.'

and I'm using Facebook Android SDK 3.23.0.

How can I know the version of Graph API used in such Facebook Android SDK?

Thank you

like image 224
Fran Avatar asked Feb 28 '17 08:02

Fran


People also ask

Where can I find Facebook API version?

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.

Which API is used in Facebook?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

How do I update my Facebook API version?

API Call – Upgrade login with your developer account if you are not logged in yet. select your APP. click Settings>Advanced. Select the latest version under the Upgrade API Version section for both “Upgrade All Calls” and “Upgrade Calls for App Roles”


1 Answers

I had the same problem, and annoyingly, I couldn't find anything about this in documentation. You can, however, refer to these two links:

https://developers.facebook.com/docs/android/upgrading-3.x https://developers.facebook.com/docs/android/upgrading-4x

And induce that your version (3.23.0) is on either Graph API version 2.2 or 2.3 - couldn't quite figure out which one of the two it is. Alternatively it seems that you can call this function from your code:

com.facebook.internal.ServerProtocol.getAPIVersion();

This should return a String of the current Graph API version that you can log. In my case, for SDK version 4.0.1, it was Graph API "v2.3"

Update: It seems that in newer versions of the FB SDK (just tried it in v4.23.0), getApiVersion() has been changed into getDefaultAPIVersion(). Seems to do the same thing.

like image 167
Sofie Vos Avatar answered Sep 22 '22 06:09

Sofie Vos