facebook api版本用于facebook android sdk [英] facebook api version used in facebook android sdk
问题描述
'MyApp目前可以访问Graph API v2.2,该版本将在2年内完成为了确保顺利过渡,请将所有调用转移到Graph API v2.3或更高版本。
我正在使用Facebook Android SDK 3.23.0。
如何知道这种Facebook Android SDK中使用的Graph API的版本?
谢谢
我有同样的问题,令人烦恼的是,我在文档中找不到任何内容。但是,您可以参考这两个链接:
https://developers.facebook.com/docs/android/upgrading-3.x
https://developers.facebook.com/docs/android/upgrading-4x
并且导致您的版本(3.23.0)在Graph API 2.2或2.3版本 - 无法弄清楚其中的哪一个。或者,您似乎可以从代码中调用此函数:
com.facebook.internal.ServerProtocol.getAPIVersion();
这应该返回一个可以记录的当前Graph API版本的String。在我的情况下,对于SDK版本4.0.1,它是Graph APIv2.3
更新:似乎在较新版本的FB SDK(刚刚尝试它在v4.23.0), getApiVersion()
已被更改为 getDefaultAPIVersion()
。似乎也做同样的事情。
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
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.
这篇关于facebook api版本用于facebook android sdk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!