I have the following code.
It works and posts the message-part but the attachment part does\'nt work. I suspect it has to do with passing a JSON as a string.
Fac
Bundle params = new Bundle();
// params.putString("multipart/form-data", imgurl);
params.putByteArray("multipart/form-data",byteArray);
params.putString("caption", txtcaption.getText().toString());
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/me/photos",
params,
HttpMethod.POST,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
Log.e("responseImagedata---", response.toString());
}
}
).executeAsync();