facebook android sdk中使用的facebook api版本 [英] facebook api version used in facebook android sdk

查看:45
本文介绍了facebook android sdk中使用的facebook api版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Facebook 开发者处收到以下提醒:

I'm getting the following alerts on Facebook Developers:

'MyApp 目前可以访问 Graph API v2.2,其 2 年生命周期将于 2017 年 3 月 27 日结束.为确保顺利过渡,请将所有调用迁移到 Graph API v2.3 或更高版本.'

'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.'

我使用的是 Facebook Android SDK 3.23.0.

and I'm using Facebook Android SDK 3.23.0.

我如何知道此类 Facebook Android SDK 中使用的 Graph API 版本?

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

谢谢

推荐答案

我遇到了同样的问题,而且很烦人的是,我在文档中找不到任何关于此的信息.但是,您可以参考这两个链接:

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.xhttps://developers.facebook.com/docs/android/upgrading-4x

并推断您的版本 (3.23.0) 是 Graph API 版本 2.2 或 2.3 - 无法弄清楚它是两者中的哪一个.或者,您似乎可以从代码中调用此函数:

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();

这应该返回您可以记录的当前图形 API 版本的字符串.就我而言,对于 SDK 版本 4.0.1,它是 Graph API "v2.3"

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"

更新:似乎在较新版本的 FB SDK(刚刚在 v4.23.0 中尝试过)中,getApiVersion() 已更改为 getDefaultAPIVersion().似乎做同样的事情.

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 android sdk中使用的facebook api版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆