Android Facebook 3.0如何发布墙?

Android Facebook 3.0如何发布墙?,android,facebook,facebook-android-sdk,Android,Facebook,Facebook Android Sdk,因此,新的facebook 3.0。但是当它不飞的时候你怎么办 我从facebook得到以下回应: {Response: responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 100, errorType: OAuthException, errorMessage: (#100) Missing message or attachment}, isFromCache:false} private v

因此,新的facebook 3.0。但是当它不飞的时候你怎么办

我从facebook得到以下回应:

{Response:  responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 100, errorType: OAuthException, errorMessage: (#100) Missing message or attachment}, isFromCache:false}
private void publishStory() {
    Bundle postParams = new Bundle();
    postParams.putString("name", "Test");
    postParams.putString("caption", "Another Test");
    postParams.putString("description", mEdit.getText().toString());

    Request.Callback callback = new Request.Callback() {
        public void onCompleted(Response response) {
            JSONObject graphResponse = response
                                       .getGraphObject()
                                       .getInnerJSONObject(); //FIXME <-- here we get the error
            String postId = null;
            try {
                postId = graphResponse.getString("id");
            } catch (JSONException e) {
                Log.i(GlobalValues.LOG_TAG,
                    "JSON error "+ e.getMessage());
            }
            FacebookRequestError error = response.getError();
            if (error != null) {
                Toast.makeText(getActivity()
                     .getApplicationContext(),
                     error.getErrorMessage(),
                     Toast.LENGTH_SHORT).show();
                } else {
                    Toast.makeText(getActivity()
                         .getApplicationContext(), 
                         postId,
                         Toast.LENGTH_LONG).show();
            }
        }
    };

    Request request = new Request(ParseFacebookUtils.getSession(), "me/feed", postParams, 
                          HttpMethod.POST, callback);

    RequestAsyncTask task = new RequestAsyncTask(request);
    task.execute();
}
以下是我的权限更新:

                Session session = ParseFacebookUtils.getSession();
                if(session != null) {

                    List<String> permissions = session.getPermissions();
                    if (!isSubsetOf(PERMISSIONS, permissions)) {
                        Session.NewPermissionsRequest newPermissionsRequest = new Session
                                .NewPermissionsRequest(this, PERMISSIONS);
                        session.requestNewPublishPermissions(newPermissionsRequest);
                        return;
                    }

                    publishStory();
                }

您是否检查了发布权限?您发布的链接中的代码在发送请求之前检查权限

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

errorType:OAuthException
似乎您的密码有问题authentification@BenjaminSchwalb建议的行动?我不知道,从未使用过FacebookSDK,只要指出它,如果你还没有看到它。你试过添加关键的“消息”吗?postParams.putString(“消息”、“我的消息”);你想让我在哪里添加密钥?添加它捆绑后参数,下面是其他参数。现在为什么添加“消息”在我有名称标题和描述但根本不显示的情况下起作用:我想这是因为我不使用链接或图像。Facebook SDK有时可能缺少文档。
[status_update, photo_upload, video_upload, create_note, share_item, publish_stream, publish_actions, basic_info]
    // Check for publish permissions    
    List<String> permissions = session.getPermissions();
    if (!isSubsetOf(PERMISSIONS, permissions)) {
        pendingPublishReauthorization = true;
        Session.NewPermissionsRequest newPermissionsRequest = new Session
                .NewPermissionsRequest(this, PERMISSIONS);
    session.requestNewPublishPermissions(newPermissionsRequest);
        return;
    }
Bundle postParams = new Bundle();
postParams.putString("name", "Test");
postParams.putString("caption", "Another Test");
postParams.putString("description", mEdit.getText().toString());
postParams.putString("message", "My message");