Status code 500 during upload multipart entity image to server in android code
Html form: (can add successfully image to server)
hi after having lots of search trial and error finally got this friends
//on how to upload image to facebook using graph apis
Bundle params = new Bundle();
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();