简体   繁体   English

我的带有Facebook SDK v4.3的Android应用程序能否在低于4.4 Kitkat的版本上运行?

[英]Will my Android App with Facebook SDK v4.3 work on versions lower than 4.4 Kitkat?

So the new Facebook SDK 4.3 is out, I am doing the ceremony to update my app. 因此,新的Facebook SDK 4.3已经发布,我正在举行仪式来更新我的应用程序。 To get rid of all the errors that pop up, I reach a point where I must step up the JDK version of my app from 1.6 to 1.7. 为了消除所有弹出的错误,我必须将应用程序的JDK版本从1.6升级到1.7。 This also means that I must also step up my minumum Android API from 9 to Kitkat (19). 这也意味着我还必须将最低的Android API从9升级到Kitkat(19)。 I need to support at least, 4.0 - 4.3 users too. 我也需要至少支持4.0-4.3个用户。 Has somebody been able to make facebook SDK 4.3v work with Android versions older than 4.4 Kitkat(19)??? 有人能够使Facebook SDK 4.3v与4.4 Kitkat(19)之前的Android版本一起使用吗????

I did not want to give up my pre-KitKat users, so I found a way to make the same old SDK compliant with facebook´s new API. 我不想放弃KitKat之前的用户,所以我找到了一种使旧的SDK兼容facebook的新API的方法。 No need to install a new SDK, and no need to re-implement Facebook login and authentication inside my app (Session was replaced by 3 more objects, and other changes I dont have time to change.) So the recipe is simple, just open: 无需安装新的SDK,也无需在我的应用程序内重新实现Facebook登录和身份验证(Session被3个以上的对象替代,并且其他更改我没有时间更改。)因此,配方很简单,只需打开:

src > com.facebook.android > Facebook.java

..and change this line of code (aprox. line #87): ..并更改以下代码行(大约第87行):

protected static String GRAPH_BASE_URL = "https://graph.facebook.com/";

to this: 对此:

protected static String GRAPH_BASE_URL = "https://graph.facebook.com/v2.0/";

Voila!! 瞧! Maybe later, Facebook totally deprecates my entire Facebook SDK 3.19.1, but for today, the day has been saved. 也许以后,Facebook完全弃用了我的整个Facebook SDK 3.19.1,但是今天,这一天已经保存了下来。

Source: 资源:

https://developers.facebook.com/docs/apps/upgrading#v1tov2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM