15

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

Fran
  • 616
  • 4
  • 17

4 Answers4

17

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.

Sofie Vos
  • 383
  • 2
  • 12
  • 1
    Thank you! This help me a lot – Fran Feb 28 '17 at 15:34
  • How to get the same in iOS (Objective C) ? If you have any idea would be a great help! Thanks – Niki Mar 16 '18 at 06:30
  • 1
    It works for me to use `com.facebook.internal.ServerProtocol.getDefaultAPIVersion()` with FB SDK v4.28.0, the Graph API version is `2.11` – Yao Li Mar 22 '18 at 16:43
  • Your answer is what helped me mostly , but check the below thread which contains all the version supportinng of APis depending on SDK Version , but does require quite the scrolling . Anyone wondering which api version is supported by SDK version 5.9.0 upwards its API Version 5.0 https://github.com/facebook/facebook-ios-sdk/blob/master/CHANGELOG.md – Anjula Serasinghe Dec 30 '19 at 08:23
3

See this image for answer

you can change version in fb application dashboard under settings -> advanced for both testing and production version

Prankush
  • 41
  • 1
  • 5
  • @VadimTofan the option is still available in facebook developer portal. If you meant anything else, then please elaborate. – Prankush Jun 14 '17 at 03:03
2

The current, latest version of the Graph API is v2.8 and SDK version is 4.19.0. you should have upgrade it.

Add the compile dependency with the latest version of the Facebook SDK in the build.gradle file

dependencies { 
     compile 'com.facebook.android:facebook-android-sdk:4.+'
}

Can see reference link-

Garg
  • 2,731
  • 2
  • 36
  • 47
  • 4
    I know which ones are the latest versions. However my question aims to ask about which Graph API version is using each android SDK version – Fran Feb 28 '17 at 09:05
-1

I think we can determine which Graph API version is using each android SDK version by updating the timeline.

Can see reference link

Venson
  • 1,772
  • 17
  • 37
  • 1
    Welcome to Stackoverflow. Please refrain from posting such dumps of text in an answer. A link to your source is ok. – Venson Mar 26 '19 at 02:09