Размер страницы холста facebook-c # -sdk - PullRequest
0 голосов
/ 22 марта 2011

Может кто-нибудь сказать, как изменить размер страницы страницы iframe в Facebook с новым v5 facebook-c # -sdk? Я попробовал несколько решений от Google, однако я думаю, что не вызываю правильный метод FB или метод facebook c # sdk.

Мой iframe обрезается, даже если остальная часть страницы загружается правильно за пределами Facebook.

Я не могу идти дальше, этот код работает на localhost и с включенными полосами прокрутки FB, однако при отключенной полосе прокрутки FB холст всегда обрезается. Я даже пытался отключить настройку накопительного пакета 2010 года. Пожалуйста, помогите.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ddd.aspx.cs" Inherits="CN.Project.WebUI.ddd" %>

body {overflow: hidden;}

<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>

<br/>
<h3>My test header</h3>
<br/>
<p>
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app.
Welcome this is a test of a really long page for a facebook app. (last)
</p>

</form>






using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web;  
using System.Text; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Facebook; 
using Facebook.Web; 
using System.Configuration;

namespace CN.Project.WebUI { 
public partial class ddd : System.Web.UI.Page { 
protected void Page_Load(object sender, EventArgs e) { RegisterScripts(); }

public void RegisterScripts()
{
    var settings = ConfigurationManager.GetSection("facebookSettings");
    var current = settings as IFacebookApplication;

    String csname = "FBInit";
    Type cstype = this.GetType();
    ClientScriptManager cs = Page.ClientScript;
    StringBuilder strCmd;
    strCmd = new StringBuilder();
    strCmd.Append("$(document).ready(function () { FB.init({ appId: '" + current.AppId + "', status: true, cookie: true, xfbml: true }); });\r\n");
    strCmd.Append("window.fbAsyncInit = function() {FB.Canvas.setAutoResize()};\r\n");
    if (!cs.IsStartupScriptRegistered(cstype, csname))
    {
        cs.RegisterStartupScript(cstype, csname, strCmd.ToString(), true);
    }

}
}
}

1 Ответ

0 голосов
/ 22 марта 2011

Не думаю, что изменение размеров холста относится к Facebook c # sdk.

Возможно, вам следует обратиться к этому FB.Canvas.setAutoResize

...