Session OK!? but fbApplication.Service.Users.GetUser = null

Apr 2, 2008 at 9:28 AM
Hi All,

I have uploaded this default test page (with a few response.writes) to my server as follows:-

<%@ Page Language="C#" %>
<!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 id="Head1" runat="server">
<title>Hello World IFrame Facebook Application</title>
<link rel="stylesheet" type="text/css" href="Page.css" />
</head>
<body>

<fb:FacebookApplication ID="fbApplication" runat="server" Mode="IFrame"
EnableExternalBrowsing="true" EnableDebugging="true"
ApplicationName="WTMFB" />

<form id="Form1" runat="server">
<h1>Hello World</h1>
<h2><asp:Label runat="server" ID="greetingLabel" /></h2>

<hr />

<h2>How about saying Hello to your friends?</h2>
<table cellpadding="4" cellspacing="0" border="0">
<tr>
<td>Select a greeting:</td>
<td>
<asp:DropDownList runat="server" ID="greetingDropDownList">
<asp:ListItem Text="Hi!" Value="Hi" />
<asp:ListItem Text="Hey!" Value="Hey" />
<asp:ListItem Text="Hello!" Value="Hello" />
</asp:DropDownList>
</td>
</tr>
<tr runat="server" id="friendsRow">
<td>Select some friends:</td>
<td>
<asp:ListBox runat="server" ID="friendList" SelectionMode="Multiple"
DataSourceID="friendsQuery"
DataTextField="name" DataValueField="uid" />
</td>
</tr>
<tr runat="server" id="storyRow">
<td> 
Apr 2, 2008 at 6:27 PM
Now this may be a crazy question, but I have to make sure: did you set the attributes "ApplicationKey" and "Secret" on the FacebookApplication control? I'm sure you just omitted them.

Bill
Apr 3, 2008 at 1:08 PM
Thanks for reply,

"ApplicationKey" and "Secret" was in web.config.

<facebook>
<application name="WTMFB" apiKey="X" secret="Y"
type="GlobalApplication" />
</facebook>

but moved them into

<fb:FacebookApplication ID="fbApplication" runat="server" Mode="IFrame"
EnableExternalBrowsing="false" EnableDebugging="true"
ApplicationKey="abc"
Secret="def"
ApplicationName="WTMFB" />

to be sure

its an iframe app in facebook, not ext :( cant work it out ...

if i put rubbish in these key/secret fields, the page remains like this?? how can i tell if this is a key/secret error? even though i have treble checked them, this looks central to problem, shouldnt api fail? :( hope u can help

Apr 3, 2008 at 5:38 PM
my server IP had changed! aaaaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrgggggggggggggggggggggggggggggh
Apr 3, 2008 at 9:03 PM
You may want to leave your IP addresses blank in the Facebook app settings. That's what I do for my dev versions and production is the one that has the expected servers listed explicitly.

Bill
Apr 16, 2008 at 5:33 PM
Thank you for the tip :-)