Reputation: 924
i m trying to post images on friends fb wall, im getting selected friend ID, and image that is converted in base64 string just getting response as error below
{Response: responseCode: 200, graphObject: null, error: {HttpStatus: 200, errorCode: 3, errorType: null, errorMessage: Unknown method}, isFromCache:false}
my code below
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);
}
please help
Upvotes: 0
Views: 1394
Reputation: 397
Posting image or any content on friend's walls is no more supported by the sdk since feb 6, 2013. You need to use the feed dialog to do that..
check this link..
https://developers.facebook.com/roadmap/completed-changes/
Upvotes: 2