GraphRequest imagesAlbumPost = new GraphRequest(token, "/1325165102/photos",
bundle, HttpMethod.POST,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
uploadedPhotoId = "";
Log.d("Image Post", "Res =" + response.toString());
}
});
1325165102
is the id of album Profile Pictures
(dummy id)
It gives the following exception:
{Response: responseCode: 200, graphObject: null, error: {HttpStatus: 403, errorCode: 220, errorType: OAuthException, errorMessage: (#220) Album or albums not visible}}
Is it normal? Is there any way to upload picture to Profile Pictures
?
You can not upload to the user’s profile pictures album any more.
You can only upload to an album created for your app (Facebook will do that automatically, if you post to /me/photos) or you can upload to specific album other than "Profile Pictures" album, and then the user can select to use that image as their new profile image themselves via the Facebook UI.
Hope this helps!