You have to make another request with the id of the resource in order to get the url of the image you are trying to reference in the share dialog.
So you should do something like this:
Callback callback = new Callback() {
@Override
public void onCompleted(Response response) {
if (response.getGraphObject() != null) {
String imageUrl = (String) response.getGraphObject().getProperty("picture");
// call to your sharing method
share(session, text, imageUrl);
}
}
};
Request request = new Request(Session.getActiveSession(), imageid, null, HttpMethod.GET, callback);
request.executeAsync();