my english is not so perfect but i want to learn, so i hope you can understand me. I wanna know how can i change the facebook profile pic using facebook android sdk. im able to upload pictures from my app to any album, including "Profile Pictures" (i use the next code:)
params=new Bundle();
params.putByteArray("photo", photo);
params.putString("caption", description);
mAsyncRunner.request(idAlbum+"/photos", params,"POST",new RequestListener() {
@Override
public void onMalformedURLException(MalformedURLException e, Object state) {}
@Override
public void onIOException(IOException e,Object state) {}
@Override
public void onFileNotFoundException(FileNotFoundException e, Object state){}
@Override
public void onFacebookError(FacebookError e,Object state) {}
@Override
public void onComplete(String response, Object state) {
mHandler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(),"Success", Toast.LENGTH_LONG).show();
}
});
}
}, null);
but i dont know how to set the uploaded image as the profile pic. maybe adding some code to this? I know that what i ask is posible using facebook sdk for php. also, i have seen an Apple app that do this too. Then, i think i can do it in android. somebody has information about what im looking for? thanks in advance.