Upload image to facebook from SD card in android

前端 未结 2 1788
故里飘歌
故里飘歌 2021-01-26 10:47

I Can\'t able to upload the images on the facebook from SD card...I used below code....but it did not give me error but at the same time it did not upload the images



        
2条回答
  •  迷失自我
    2021-01-26 11:48

    You have to do this:

     mAsyncRunner = new AsyncFacebookRunner(fbObj);  
      mAsyncRunner.request(null, parameters, "POST",
                            new RequestListener() {
    
                                @Override
                                public void onMalformedURLException(
                                        MalformedURLException e, Object state) {
                                    // TODO Auto-generated method stub
    
                                }
    
                                @Override
                                public void onIOException(IOException e, Object state) {
                                    // TODO Auto-generated method stub
    
                                }
    
                                @Override
                                public void onFileNotFoundException(
                                        FileNotFoundException e, Object state) {
                                    // TODO Auto-generated method stub
    
                                }
    
                                @Override
                                public void onFacebookError(FacebookError e,
                                        Object state) {
                                    // TODO Auto-generated method stub
    
                                }
    
                                @Override
                                public void onComplete(String response, Object state) {
                                    // TODO Auto-generated method stub
                                    Log.i("upload", "image uploaded!!!! " + response);
                                }
                            }, null);
    

提交回复
热议问题