So the new Facebook SDK 4.3 is out, I am doing the ceremony to update my app. 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. This also means that I must also step up my minumum Android API from 9 to Kitkat (19). I need to support at least, 4.0 - 4.3 users too. Has somebody been able to make facebook SDK 4.3v work with Android versions older than 4.4 Kitkat(19)???
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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. 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:
src > com.facebook.android > Facebook.java
..and change this line of code (aprox. line #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.
Source:
https://developers.facebook.com/docs/apps/upgrading#v1tov2