0

我创建一个web应用程序,类似于从Facebook等等框代码:http://developers.facebook.com/docs/reference/plugins/like-box/检索Facebook的样箱动态

当用户在Web应用程序中粘贴,如果他们所选择的流,而产生类似框代码,他们应该能够获得的样箱,包括饲料。

我用下面的代码来做到这一点;但问题是我无法检索喜欢该页面的用户的图片。

如何获取他们的个人资料信息?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Facebook Feeds</title> 

<script type="text/javascript"> 
function getPage() 
{ 
    var getCont=document.getElementById("txarea").value; 
    document.getElementById("getContent").innerHTML=getCont; 
} 
</script> 
</head> 

<body> 

<input type="text" id="txarea" /> 
<input type="button" id="fbBtnClick" value="Click" onclick="getPage();"></input> 
<div id="getContent"> 
</div> 

</body> 
</html> 

回答

1

所以我已经测试了这一点,下面似乎是这个问题:

iframe的高度是由默认图片加载,但被隐藏监守设置为427px iframe的高度不够

长期默认的Facebook给出如下:

<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fplatform&amp;width=292&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=true&amp;header=true&amp;高度= 427" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px;高度:427px; " allowTransparency="true"></iframe>

改变太:

<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fplatform&amp;width=292&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=true&amp;header=true&amp;高度= 567" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px;高度:567px; " allowTransparency="true"></iframe>

将显示图片..所以我认为你将不得不从你的用户采取输入,然后改变高度,然后设置它。

+0

由于其工作细 – 2011-06-13 13:33:55