从android获取用户facebook的所有照片

时间:2015-05-13 02:59:10

标签: android facebook facebook-graph-api

我正在尝试获取用户的所有照片脸书,但响应始终返回null

我的代码在这里:

Session.openActiveSession(this, true, Arrays.asList("user_photos"), new Session.StatusCallback() {
                // callback when session changes state
                @Override
                public void call(Session session, SessionState state, Exception exception) {
                    if (session.isOpened()) {
                        new Request(session, "/me/photos", getRequestParameters(session), HttpMethod.GET, new Request.Callback() {
                            @Override
                            public void onCompleted(Response response) {
                                ArrayList<String> imageUrls = new ArrayList<String>();//trungnv edit
                                JSONObject jsonObject = response.getGraphObject().getInnerJSONObject();
                                try {
                                    JSONArray dataArray = jsonObject.getJSONArray("data");
                                    VogDebug.printlnObject("trungnv debug get image from facebook", response);

                                    }

                                } catch (JSONException e) {
                                    e.printStackTrace();
                                }
                            }
                        }).executeAsync();
                    }
                }


            });

请帮帮我。感谢

回复回复:     {Response:responseCode:200,graphObject:GraphObject {graphObjectClass = GraphObject,state = {&#34; data&#34;:[]}},error:null,isFromCache:false}

0 个答案:

没有答案