不能添加注释的照片在Facebook的Andr​​oid应用程序 [英] Can't add comments to photos in Facebook Android application

查看:143
本文介绍了不能添加注释的照片在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());
            }
        }
    }

这篇关于不能添加注释的照片在Facebook的Andr​​oid应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆