How Increase the hight of the iframe page in facebook

May 12, 2008 at 11:45 AM
How can I increase the hight of the iframe page in the facebook as per the hight of the page in my application being now it is showing a scrollbar . I using Iframe  and smart size on the Iframe canvas. All the pages is inherit from a master page. The default page coding is
 
public partial class _Default : CanvasIFrameBasePage
{
    private string FACEBOOK_API_KEY = ConfigurationManager.AppSettings["FacebookAPIKey"];
    private string FACEBOOK_SECRET = ConfigurationManager.AppSettings["FacebookSecret"];
  


    new protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
        base.Api = FACEBOOK_API_KEY;
        base.Secret = FACEBOOK_SECRET;
        base.Page_Load(sender, e);
        }
}

   Please provide me the solution.
May 12, 2008 at 12:39 PM
Hi wong...
 follow this link  it will help you to get your problem resolved...
http://www.codeplex.com/FacebookToolkit/Thread/View.aspx?ThreadId=23685

wong wrote:
How can I increase the hight of the iframe page in the facebook as per the hight of the page in my application being now it is showing a scrollbar . I using Iframe  and smart size on the Iframe canvas. All the pages is inherit from a master page. The default page coding is
 
public partial class _Default : CanvasIFrameBasePage
{
    private string FACEBOOK_API_KEY = ConfigurationManager.AppSettings["FacebookAPIKey"];
    private string FACEBOOK_SECRET = ConfigurationManager.AppSettings["FacebookSecret"];
  


    new protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
        base.Api = FACEBOOK_API_KEY;
        base.Secret = FACEBOOK_SECRET;
        base.Page_Load(sender, e);
        }
}

   Please provide me the solution.



May 13, 2008 at 5:10 AM
Dear kissu,

       Thank you for your reply. I already tried but still cannot solve the height problem. Could you provide me any sample simple project that can help me to solve the problem. Thank you.
May 13, 2008 at 4:52 PM
hi wong....

Being in ur app all the pages inherited  from  masterpage , U try like this:

Use this in MasterPage ..... and call IframeAdjust(); in body onload, it may work........


<script src="http://static.ak.facebook.com/js/api_lib/v0.2/FeatureLoader.js" type="text/javascript"></script>//watch out . YOU MUST USE v0.2 and NOT v0.3.

<script type="text/javascript">
//after a delay of 500 ms we fire the "fireRequireFeatures()" method. We do this to prevent
//IE from throwing the "Internet Explorer cannot open the internet site. Operation aborted" message.
function IframeAdjust()
{
var userAgent;
userAgent = window.navigator.userAgent.toLowerCase();

if (userAgent.indexOf("msie") >= 0 || userAgent.indexOf("microsoft internet explorer") >= 0) //capture browser type and do the delay
{
setTimeout("fireRequireFeatures()",500); //here i delay 500 milliseconds
}
else
fireRequireFeatures(); //no problem with other browser

function fireRequireFeatures()
{
FB_RequireFeatures("CanvasUtil", function(){
FB.XdComm.Server.init("/xd_receiver.htm");
FB.CanvasClient.startTimerToSizeToContent();
});
}


}



</script>

Also, my xd_receiver.htm file looks like as follows

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Cross-Domain Receiver Page</title>
</head>
<body>
<script src="http://static.ak.facebook.com/js/api_lib/v0.3/XdCommReceiver.debug.js" type="text/javascript"></script>//watch out the version here. It works for me in this combination
</body>
</html>



Thanks

Naren.....