不能添加注释的照片在Facebook的Andr​​oid应用程序

问题描述:

我试图开发Android Facebook应用程序。我无法添加注释功能集成到Facebook的相册中的照片。使用图形API,我可以显示$ P $照片上的pviously提出的意见。但是,我不能添加新的评论的照片。

I am trying to develop a Facebook application for Android. I am unable to integrate the "Add Comment" feature to photos in Facebook Albums. Using the Graph API, I can show the previously made comments on a photo. However, I just can't add new comments to a photo.

有人可以提供我一些有用的建议?

Can somebody provide me some helpful advice?

这里是这样做的简单的例子。

here is simple example on doing that..

// post comment to single photo
        Bundle parameters = new Bundle();
        String target = "";

        target = "<PHOTO_ID>/comments";
        parameters.putString("message", "post Comment testing");
        mAsyncRunner.request(target, parameters, "POST", new FacebookRequestListener(target+" (post comment)"));

和这里是听者一个简单的例子(你可以从Facebook,Android的SDK的例子得到这个太)

and here is a simple example for the listener (you can get this from examples of facebook-android-sdk too)

public class FacebookRequestListener extends BaseRequestListener {

        String caller = "default";
        public FacebookRequestListener() {
        }
        public FacebookRequestListener(String caller) {
            this.caller = caller;
        }

        public void onComplete(final String response) {
            try {

                Log.d(TAG, "FacebookRequestListener|"+caller+":" + response);
            } catch (Exception e) {
                Log.w(TAG, "Error:"+e.getMessage());
            }
        }
    }