Skip to content Skip to sidebar Skip to footer

Can't Add Comments To Photos In Facebook Android Application

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 prev

Solution 1:

here is simple example on doing that..

// post comment to single photoBundleparameters=newBundle();
        Stringtarget="";

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

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

publicclassFacebookRequestListenerextendsBaseRequestListener {

        Stringcaller="default";
        publicFacebookRequestListener() {
        }
        publicFacebookRequestListener(String caller) {
            this.caller = caller;
        }

        publicvoidonComplete(final String response) {
            try {

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

Post a Comment for "Can't Add Comments To Photos In Facebook Android Application"