2011-09-05 77 views
1

有关此调用的所有信息均有效,但图片不显示。 我在SO上发现了一个other question,但没有解析。FB.UI图片不显示

任何想法为什么这不显示图片?据我所知,FB正在吃图片,因为它甚至不会在对话框中显示为标签,如果我乱搞URL,它会检测到问题并抛出错误信息,但为什么它是否在吃图像呢?

FB.ui({method: 'feed',          
     app_id: 'XXXX', 
     name: 'This is the name field', 
     link: 'http://localhost:8080/facebook/', 
     picture: 'http://localhost:8080/img/sample.gif', 
     caption: 'This is the caption', 
    description: 'Description field'}, 
     function(response) { 
      if (response && response.post_id) { 
       alert('Post was published.'); 
      } else { 
       alert('Post was not published.'); 
      } 
     }); 

回答

2

因为你把你的代码放在本地主机上。 Facebook不知道你的“本地主机”在哪里。 将您的代码放置到公共托管中,并写入ip路径或域名。

+0

是的。这就是它所需要的。谢谢。 – boatcoder