2011-04-26 80 views
1

我使用Facebook SDK發佈消息,從Android應用程序,在我的Facebook帳戶牆其看起來很不錯,但是當我使用garph API的下面的代碼上傳的圖片,使用圖形API上傳到Facebook的Android照片?

  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"); 

,但我得到了以下錯誤,

04-26 15:01:02.005: DEBUG/UPDATE RESPONSE(9405): { "error":{"type":"OAuthException","message":"(#324) Requires upload file"}}

回答

3

只是試試這個

bundle.putString("picture", "http://simplestrength.com/wp-content/uploads/kanji_luck.png"); 
String response = facebook.request("me/feed",bundle,"POST"); 

用於在後專輯..

bundle.putByteArray("picture", byte); 
String response = facebook.request("me/photos",bundle,"POST"); 

其中圖像的byte = bytearray ..

+0

它是工作,我張貼的圖片在我的牆上,如果我想的圖像相冊上傳我的Facebook帳戶我能做些什麼。 – Karthi 2011-04-26 11:10:48

+0

看到我的編輯答案.... – 2011-04-26 11:16:48

+0

但它會拋出相同的錯誤 – Karthi 2011-04-26 11:36:35

相關問題