1

In MY android app i want to share video from android app to facebook wall. Below is my code for doing so-

Request.Callback callback5 = new Request.Callback() {
                    public void onCompleted(Response response) {    
                        Toast.makeText(mContext,"Success",Toast.LENGTH_SHORT).show();
                        mDialog.dismiss();
                    }
                };
                File mFile = new File(videoPath);
                 Request request5;
                try {
                    request5 = Request.newUploadVideoRequest(session,
                             mFile, callback5);
                     RequestAsyncTask task5 = new RequestAsyncTask(request5);
                       task5.execute();
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                }

Also made changes in fb api console.But when upload video-

{Response:  responseCode: 403, graphObject: null, error: {HttpStatus: 403, errorCode: 200, errorType: OAuthException, errorMessage: (#200) Requires extended permission: publish_actions}, isFromCache:false}

Edit: Permissions i have added-

            `   Session s = new Session(mContext);
                Session.setActiveSession(s);
                s.openForPublish(new Session.OpenRequest(PostVideoToFBWall.this).setCallback(callback).setPermissions("public_profile","email","publish_actions"));`

enter image description here

Ravi Bhandari
  • 4,682
  • 8
  • 40
  • 68
  • Like the error says, you don't have the right permissions. http://stackoverflow.com/questions/12098386/facebook-requires-extended-permission-publish-actions – Ken Wolf Oct 04 '14 at 10:28
  • Please check my updated question,i have added permission on both dashbord and my code but same error. – Ravi Bhandari Oct 04 '14 at 10:51
  • Still not finding solution to my problem.any one can please sugest how to post video to fb from my native app. – Ravi Bhandari Oct 06 '14 at 10:22
  • This is likely a race condition, where you're making the video upload request before your request for publish permissions is finished. Without more code, it's impossible to tell, but that's the likely error. Check out the Hello Facebook sample, or the Scrumptious sample app, where it defers the upload until it gets all the permissions required. – Ming Li Oct 07 '14 at 21:56

0 Answers0