Please Help a Noob out here :)

Dec 17, 2009 at 5:02 PM

Hi Guys,

I am pretty new to FB development and have 1 hurdle I need to get out of the way.

Im using VS2008 and have downloaded the 3.0 toolkit.

Created a new website (VB), created a master page it  Inherits Facebook.Web.CanvasIFrameMasterPage

and in the code-behind

Public Sub New()
        RequireLogin = True
    End Sub


then i have a default.aspx page that uses that master page as its master

in the aspx.

right in the beginning (i moved this to the <head> section )

<script src="" type="text/javascript"></script>


and just before the body ends

<script type="text/javascript">
        FB_RequireFeatures(["XFBML"], function() { FB.Facebook.init("0da4d26b6a161c3d4a8a77f579568241", "channel/xd_receiver.htm"); });


and in the body i have Hello <fb:name firstnameonly="true" useyou="false" linked="false" uid="loggedinuser"></fb:name>

I got all this from the samples.

I host this and then with Facebook goto my application ..  I can only see Hello   ....not any name or anything else.

its just blank ... no errors.

i did everything the sample did. i put in my api key and secret in the web config...

What am i missing??

Dec 22, 2009 at 4:07 AM

I don't know vb but here's an example C#:

in your Default.aspx.cs:

namespace namespace_Name{

public partial class _Default : System.Web.UI.Page

        IFrameCanvasSession fbcs = new IFrameCanvasSession("API KEY", "SECRET KEY");
        protected void Page_Load(object sender, EventArgs e)
            Api api = new Api(fbcs);
            Label1.Text = api.Users.GetInfo().name;  // label in your asp page




in your Default.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="namespace_Name._Default" %>

inside the <body> tag

Welcome <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>