安卓:Facebook的图形API V1.0 [英] Android: Facebook Graph Api v1.0
问题描述
我使用Facebook的SDK 3.16我的应用程序。 4月30日(2014年)之前申请注册,所以我基本上应该有机会获得图形API V1.0。但是,当我通过应用程序登录,我可以只使用图形API V2 +。我不希望它。我怎样才能为图API v1.0的访问?
I am using Facebook SDK 3.16 for my application. Application registered before April 30th (2014), so I basically should have access to Graph Api v1.0. But when i login via application i can use only Graph Api v2+. I don't want it. How can I get access for Graph Api v1.0?
P.S。通过图形API浏览器一切正常。所以,我很困惑
p.s. Via Graph Api Explorer all is ok. So i am confused
推荐答案
经过多次尝试之后,我发现我的问题的解决方案。
After several attempts, I found a solution for my problem.
如果你有兴趣:
我不得不friends.So的名单我不喜欢:
I had to get a list of friends.So i did like:
protected void getFacebookFriends() {
new Request(
session,
"me/friends",
null,
HttpMethod.GET,
new Request.Callback() {
public void onCompleted(Response response) {
JSONObject json = null;
try {
json = new JSONObject(response.getRawResponse());
JSONArray jarray = json.getJSONArray("data");
} catch (JSONException e) {
e.printStackTrace();
}
}
}
).executeAsync();
}
这回我是谁,我的应用程序登录的所有用户。
It returned me all users who logged in my application.
所以,我只是简单地添加版本图形API在请求
这样的:
So i simply added version Graph Api in Request
like:
new Request(
session,
"/v1.0/me/friends",
null,
HttpMethod.GET,
new Request.Callback() {
public void onCompleted(Response response) {
JSONObject json = null;
try {
json = new JSONObject(response.getRawResponse());
JSONArray jarray = json.getJSONArray("data");
} catch (JSONException e) {
e.printStackTrace();
}
}
}
).executeAsync();
和它返回的我所有的朋友名单!但是,它的工作原理,如果你的应用程序4月30日(2014年)之前注册的,它会去在2015年4月30日pcated $ P $
And it returned list of all my friends ! But it works if your application registered before April 30th (2014) and it will deprecated at 30th April 2015
这篇关于安卓:Facebook的图形API V1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!