使用facebook sdk将位图图像上传到Facebook时出错

时间:2014-09-10 06:54:30

标签: android facebook

我在使用

时收到此回应
Request request = Request.newUploadPhotoRequest(Session.getActiveSession(),selectedImageBitmap.get(0), uploadPhotoRequestCallback);

响应:

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

我的代码是

Session.openActiveSession(getActivity(), true, new StatusCallback() {                                                   
    @Override

 public void call(Session session, SessionState state, Exception exception) {
  Request request 
 =Request.newUploadPhotoRequest(Session.getActiveSession(),selectedImageBitmap.get(0), uploadPhotoRequestCallback);

     Bundle parameters = request.getParameters(); // <-- THIS IS IMPORTANT
    parameters.putString("message", "Your Caption Here");
    request.setParameters(parameters);
    request.executeAsync();
  }

0 个答案:

没有答案