마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 페이스북 담벼락에 글이 안올라가요ㅠㅠ

0 추천
    	Session session = Session.getActiveSession();
    	if(session != null){
            Bundle postParams = new Bundle();
            postParams.putString("name", "몽키3 추천음악");
            postParams.putString("caption", "-girls day-");
            postParams.putString("description", "걸스데이랑께");
            postParams.putString("link", "http://www.monkey3.co.kr/#/etc.album&albumID=185582");
            postParams.putString("picture", "http://imgtest.monkey3.co.kr/get_image.php?type=album&id=185582&w=100");
            System.out.println("실행");
        
 
            Request.Callback callback= new Request.Callback() {
                public void onCompleted(Response response) {
                    JSONObject graphResponse = response.getGraphObject().getInnerJSONObject();
                    String postId = null;
                    try {
                        postId = graphResponse.getString("id");
                        Toast.makeText(
                                MainActivity.this,
                                "등록성공",
                                Toast.LENGTH_SHORT).show();
                    } catch (JSONException e) {
                        Log.i("UnityFacebookTest","JSON error "+ e.getMessage());
                    }
                     
                    FacebookRequestError error = response.getError();
                    if (error != null) {
                        Toast.makeText(MainActivity.this, error.getErrorMessage(), Toast.LENGTH_SHORT).show();
                    }
                    else {
                            Toast.makeText(MainActivity.this, postId, Toast.LENGTH_LONG).show();
                    }
                }
            };
 
            Request request = new Request(session, "/me/feed", postParams, HttpMethod.POST, callback);
            RequestAsyncTask task = new RequestAsyncTask(request);
            task.execute();
        }
    }

실행시키면 널포인터라고 오류가 뜨네요... 

아직 허접이라서...많은 도움 부탁드립니다... 구글링해도 소스가 다 비슷해서 어떻게 수정해야할지...ㅠㅠㅠ

이따따끼마스 (190 포인트) 님이 2014년 2월 7일 질문

1개의 답변

0 추천
아즈라엘 (4,010 포인트) 님이 2014년 2월 7일 답변
...