Question

I was trying to post on friends wall but error occurs and no message is posting to friends wall.below is my code for wall posting

final Bundle params = new Bundle();

params.putByteArray("message", "testing".getBytes());
params.putByteArray("name", "cccc".getBytes());
params.putByteArray("link", "http://www.youtube.com".getBytes());
params.putByteArray("description", " ...".getBytes());
params.putByteArray("picture", "".getBytes());

final Request postToWall = Request.newRestRequest(Session.getActiveSession(), fbid + "/feed", params, HttpMethod.POST);
postToWall.setCallback( new Request.Callback() 
{
     @Override
     public void onCompleted(Response response) 
     {
        Log.i("", response.toString());

     }
});
Request.executeBatchAsync(postToWall);

} });



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

If anyone know why this problem is occuring please tell me the solution .

Was it helpful?

Solution

Posting to a friends wall via an app is deprecated and should not work anymore, hopefully. In most cases, this is considered spam.

See here: https://developers.facebook.com/roadmap/completed-changes/ (February 6, 2013 - "Removing ability to post to friends walls via Graph API")

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top