public static Request newUploadPhotoRequest ( Session session , File file , Callback callback ) throws FileNotFoundException { ParcelFileDescriptor descriptor = ParcelFileDescriptor . open ( file , ParcelFileDescriptor . MODE_READ_ONLY ) ; Bundle parameters = new Bundle ( 1 ) ; parameters . putParcelable ( PICTURE_PARAM , descriptor ) ; return new Request ( session , MY_PHOTOS , parameters , HttpMethod . POST , callback ) ; }
Creates a new Request configured to upload a photo to the user s default photo album . The photo will be read from the specified stream .