Video doesn't upload to facebook wall android -


i uploading video using following code

request.callback callback5 = new request.callback() {     public void oncompleted(response response) {         // response have id if successful     log.e("hackbook", "response = "+response);     } }; file tempfile; try {     tempfile = createtempfilefromasset(getapplicationcontext(), "video.mp4");     request request5 = request.newuploadvideorequest(session.getactivesession(),             tempfile, callback5);     requestasynctask task5 = new requestasynctask(request5);     task5.execute(); } catch (ioexception e) {     log.e("hackbook", "failed create temp file");     e.printstacktrace(); }  public static file createtempfilefromasset(context context, string assetpath)          throws ioexception {     inputstream inputstream = null;     fileoutputstream outstream = null;      try {     assetmanager assets = context.getresources().getassets();     inputstream = assets.open(assetpath);      file outputdir = context.getcachedir(); // context being                         // activity pointer     file outputfile = file.createtempfile("prefix", assetpath,         outputdir);     outstream = new fileoutputstream(outputfile);      final int buffersize = 1024 * 2;     byte[] buffer = new byte[buffersize];     int n = 0;     while ((n = inputstream.read(buffer)) != -1) {         outstream.write(buffer, 0, n);     }      return outputfile;     } {     com.facebook.internal.utility.closequietly(outstream);     com.facebook.internal.utility.closequietly(inputstream);     } } 

it returns following error message

 {response:  responsecode: 400, graphobject: null, error: {httpstatus:  400, errorcode: 2500, errortype: oauthexception, errormessage:  active access token must used query information  current user.}, isfromcache:false} 

can please guide me whats going wrong ?


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -