1

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"}}

GrIsHu
  • 29,068
  • 10
  • 64
  • 102
Karthi
  • 13,624
  • 10
  • 53
  • 76

1 Answers1

3

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..

duggu
  • 37,851
  • 12
  • 116
  • 113
Niranj Patel
  • 32,980
  • 10
  • 97
  • 133