facebook api version used in facebook android sdk

假如想象 提交于 2019-11-27 16:26:46

问题


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


回答1:


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.




回答2:


See this image for answer

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




回答3:


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-

  • developers.facebook.com/docs/android/getting-started/

  • developers.facebook.com/docs/graph-api.




回答4:


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

Can see reference link

  • https://developers.facebook.com/docs/android/change-log-4x
  • https://developers.facebook.com/docs/graph-api/changelog


来源:https://stackoverflow.com/questions/42503250/facebook-api-version-used-in-facebook-android-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!