restfb publish message FacebookType publishMessageResponse = facebookClient.publish("me/feed", FacebookType.class, Parameter.with("message", "hello test")); System.out.println("Published message ID: " + publishMessageResponse.getId()); photo from local FacebookType publishPhotoResponse = facebookClient.publish("me/photos", FacebookType.class, BinaryAttachment.with("icon.jpg", new FileInputStream("c:\\icon.jpg")), Parameter.with("message", "photo post")); photo from url InputStream inputpic = new URL("http://www.url.com/jpg.jpg").openStream(); FacebookType publishPhotoResponse = facebookClient.publish("me/photos", FacebookType.class, BinaryAttachment.with("icon.jpg", inputpic), Parameter.with("message", "photo post"));