android - Upload a picture with user comment -


i trying upload local image facebook native android app. want user able add comment. have done this:

params.putstring("caption", "caption"); params.putstring("description", "description"); params.putstring("picture", utility.hack_icon_url); params.putstring("name", "name");  string filename = <file_path> byte[] data = null; bitmap bi = bitmapfactory.decodefile(filename); bytearrayoutputstream baos = new bytearrayoutputstream(); bi.compress(bitmap.compressformat.jpeg, 100, baos); data = baos.tobytearray();  params.putbytearray("photo", data);  utility.mfacebook.dialog(scorealertbox.this, "feed", params, new updatestatuslistener()); 

i see dialog box fields - icon, caption, decrption. picture want upload not there.

as states in android sdk dialog documentation:

parameters - string key-value pairs passed url parameters

you can't pass local image, it's way invoke feed dialog accepts url picture parameter.

what should upload image along post using requests (or async requests).
also, if want upload image you'll need use me/photos: user object photos connection.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -