I have tried many code to send the image on facebook wall but it is not working. I am using this code
Bitmap bitmap = BitmapFactory.decodeResource(shareDialogContext.getResources(),R.drawable.splash);
byte[] byetArray = convertBitmapToByteArray(shareDialogContext,bitmap);
params.putByteArray("picture",byetArray);
objFacebook.request(profileID + "me/photos", params, "POST");
public byte[] convertBitmapToByteArray(Context context, Bitmap bitmap) {
ByteArrayOutputStream buffer = new ByteArrayOutputStream(bitmap.getWidth() *
bitmap.getHeight());
bitmap.compress(CompressFormat.PNG, 100, buffer);
return buffer.toByteArray();
}
Please suggest any useful code.