Reputation: 13752
i use the facebook sdk to post message to wall on my facebook account from android application , its looking fine but when i use the following code of garph api to upload the image ,
Bundle bundle = new Bundle();
bundle.putString("message", "Viddygo Video Sharing");
bundle.putString(Facebook.TOKEN,accessToken);
bundle.putString("image", "http://simplestrength.com/wp-content/uploads/kanji_luck.png");
String response = facebook.request("me/photos",bundle,"POST");
but i got the following error,
04-26 15:01:02.005: DEBUG/UPDATE RESPONSE(9405): { "error":{"type":"OAuthException","message":"(#324) Requires upload file"}}
Upvotes: 1
Views: 7277
Reputation: 33248
just try this
bundle.putString("picture", "http://simplestrength.com/wp-content/uploads/kanji_luck.png");
String response = facebook.request("me/feed",bundle,"POST");
for post in album..
bundle.putByteArray("picture", byte);
String response = facebook.request("me/photos",bundle,"POST");
where byte = bytearray
of image..
Upvotes: 3