0

我试图在朋友 fb 墙上发布图像,我得到选择的朋友 ID,以及转换为 base64 字符串的图像只是得到以下错误的响应

{Response:  responseCode: 200, graphObject: null, error: {HttpStatus: 200, errorCode: 3, errorType: null, errorMessage: Unknown method}, isFromCache:false}

我的代码如下

if (hasPublishPermission()) {

        Request postToWall = new Request();

        for (GraphUser friend : selectedFriends) {
            Constants.showLog("Selected Frnd", friend.getId());
            Constants.showLog("Selected Pic", picture);

            Bundle parameters = new Bundle();
            parameters.putByteArray("message", "Greetings from Wish Well!".getBytes());
            parameters.putByteArray("link", "http://pictwist.cloudganga.com".getBytes());
            parameters.putByteArray("picture", picture.getBytes());
            parameters.putByteArray("target_id", friend.getId().getBytes());

            postToWall = Request.newRestRequest(Session.getActiveSession(), friend.getId() + "/feed", parameters, HttpMethod.POST);


            Constants.showToast(getApplicationContext(), "Posted image on friend wall");


        }

        postToWall.setCallback( new Request.Callback() 
        {

            @Override
            public void onCompleted(Response response) 
            {
                Constants.showLog("Responce Posting image", response.toString());

            }
        });
        Request.executeBatchAsync(postToWall);
    } 

请帮忙

4

1 回答 1

2

自 2013 年 2 月 6 日起,SDK 不再支持在朋友的墙上发布图像或任何内容。您需要使用提要对话框来执行此操作。

检查这个链接..

https://developers.facebook.com/roadmap/completed-changes/

于 2013-08-15T12:05:00.810 回答