在android中的facebook页面上发布照片时出错

时间:2014-05-30 14:33:03

标签: android facebook facebook-graph-api photo

我将此link称为在Facebook页面上发布照片,但每次出现以下错误。

{Response:  responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 324, errorType: OAuthException, errorMessage: (#324) Requires upload file}, isFromCache:false}

代码:

Session session = Session.getActiveSession();
        if (session != null) {

            // Check for publish permissions
            List<String> permissions = session.getPermissions();
            if (!isSubsetOf(PERMISSIONS, permissions)) {
                pendingPublishReauthorization = true;
                Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(
                        buzzreview.this, PERMISSIONS);
                session.requestNewPublishPermissions(newPermissionsRequest);
                return;
            }


            Bundle postParams = new Bundle();
            postParams.putString("message", "message");
            postParams.putString("url", PhotoUrl);

    Bundle postParams = new Bundle();
                postParams.putString("message", message);
                postParams.putString("url", PhotoUrl);
                // postParams.putByteArray("url", PhotoUrl);

    new Request(session, "/page-id/photos", params,
                        HttpMethod.POST, new Request.Callback() {
                            public void onCompleted(Response response) {
    }).executeAsync();

我不知道我在哪里滞后。

请给我指导。

0 个答案:

没有答案