2013-05-21 17 views
3

我們正在使用Fb API在Facebook上發佈feed。如何使用FB.api方法上傳Feed圖片

我的代碼 -

  if (response.authResponse) {     
       var data = 
       { 
        name: "link to apply", 
        picture: 'http://www.hrgp.biz/Uploads/CompanyForTesting_499/NotesReminders/2608chemtec-logo.jpg', 
        link: "http://www.hrgp.biz/bc0efdb3-f1a7-4d81-9635-d1418e808b6d.aspx", // Go here if user click the picture 
        description: "thank you"       
       } 
       FB.api('me/feed', 'post', data, function (response) { 
        if (!response || response.error) { 
         alert(JSON.stringify(response.error)); 
        } else { 
         //alert('Post ID: ' + response.id); 
         alert('feed posted successfully.'); 
        } 
       });     
      } 
     }, { scope: 'email,user_likes,publish_actions,publish_stream,read_stream,photo_upload' }); 

此代碼的工作,但我有與圖片的問題。它不會在帖子中顯示。

我該如何解決這個問題? 或 請告訴我是否有任何問題進入我的代碼。

謝謝.. !!!

回答