视频上传到Facebook的从我的Android应用程序失败,错误扩展权限requiren状态403

2019-10-21 02:20发布

在我的Android应用我想从Android应用到的Facebook墙上分享视频。 下面是我的代码所谓做

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();
                }

在FB API console.But也做了更改时上传video-

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

编辑:权限我有added-

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

文章来源: Upload Video To Facebook from my android app fail with error extended permission requiren status 403