0

I am making an application in which i want to post videos on facebook.While i try to do that,i am getting this error:

Facebook Error: (#100) Requires extended permission: video_upload or Requires extended permission: publish_actions

This is the code:

mUploadButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                byte[] data = null;
                AssetFileDescriptor fileDesc = getResources().openRawResourceFd(
                R.raw.movie);
                String dataPath =  fileDesc.toString();
                String dataMsg = "Your video description here.";
                String dataName = "movie.mp4";
                Bundle param;
                AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(mFacebook);
                InputStream is ;
                try 
                {
                    is = fileDesc.createInputStream();

                //    is = new FileInputStream(dataPath);
                    if(is != null)
                    data = readBytes(is);
                    param = new Bundle();
                    param.putString("message", dataMsg);
                    param.putString("filename", dataName);
                    param.putByteArray("video", data);
                    mAsyncRunner.request("me/videos", param, "POST", new SampleRequestListener(), null);
                }
                catch (FileNotFoundException e) {
                   e.printStackTrace();
                }
                catch (IOException e) {
                   e.printStackTrace();
                }       
            }
        });

Please tell me what is the problem and how to solve it.

1 Answer 1

1

The problem is contained in the error message. It is a fairly clear error message I think.

In the Authentication flow for your app, you have not requested that the user grant you the video_upload, publish_actions or publish_stream Permission - any of those three will allow video uploads, but the third is more wide-ranging and triggers a second page on the auth dialog.

Check whichever SDK you're using to see if it has a convenient wrapper to ask for additional permissions in the auth flow. In the regular Oauth flow, you just add the list of permissions needed as the scope parameter in your call to the Oauth dialog

1
  • Can you please provide me some code so as to assist me how to do that Aug 26, 2012 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.