I'm trying to post a photo on the wall of a friend using RestFB, a Java API for Facebook. I tried various solutions like:
facebookClient.publish(fbu+"/photos/",FacebookType.class,new FileInputStream(pathOrig));
fbu is the Facebook user id of the friend. This code actually posts the photo on my wall!
facebookClient.publish(fbu+"/feed/",FacebookType.class,new FileInputStream(pathOrig),Parameter.with("message",message));
This code posts the message on my friend's wall, but without the photo.
Strangely, it's possible using directly Facebook to upload photos on friends wall, so it should be possible using Graph, in my opinion...
Any clue?