安卓:Facebook的图形API V1.0

编程入门 行业动态 更新时间:2024-10-17 18:14:21
本文介绍了安卓:Facebook的图形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

本文发布于:2023-11-07 05:56:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565712.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图形   Facebook   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!