request-form and CanvasFBMLBasePage

Feb 6, 2008 at 12:25 AM
I'm trying to get a request-form written on a CanvasFBMLBasePage to redirect to a 2nd page on submit or skip.

Here's the entire contents of my .aspx file

<%@ Page Language="C#" AutoEventWireup="false" CodeFile="DefaultFBML.aspx.cs" Inherits="DefaultFBML" %>
<fb:fbml>
<asp:label id="lblDashboard" runat="server"></asp:label>

<fb:request-form action="DefaultFBML2.aspx" method="POST" type="bretts hello world" content="hi there" >

<fb:multi-friend-selector

actiontext="Invite some people" />

</fb:request-form>
</fb:fbml>

It almost works, but when I hit the submit or skip button, I get:

Errors while loading page from application
Received HTTP error code 404 while loading http://xx.xxx.xxx.171/MyApp/DefaultFBML.aspxDefaultFBML2.aspx

I can't figure out why it's screwing up my URL. It should be trying to redirect to http://xx.xxx.xxx.171/MyApp/DefaultFBML2.aspx, but it just appends my 2nd page name.

I've spent 3 hours trying 10,000 different things. I'm completely stumped and confused.

Feb 6, 2008 at 12:45 AM
Edited Feb 6, 2008 at 4:32 AM
Thought i found the answer, but nope, still not working.
Feb 6, 2008 at 6:45 PM
Dou you have 'http://xx.xxx.xxx.171/MyApp/DefaultFBML.aspx' somewhere in you app settings?
Feb 6, 2008 at 7:23 PM
Edited Feb 6, 2008 at 7:34 PM
Yes I do, and I am sure that's part of the problem. But I just can't get a CanvasFBMLBasePage to work unless I put the .aspx page in the callback address. I've checked and double checked that my IIS Virtual Directory has "DefaultFBML.aspx" as the default page. I've even tried renaming the page to just default.aspx - but no matter what I do, it won't find the page unless I put the actual .aspx page in the callback address, just the path won't do it for me.

What's maddening is that if I try a CanvasIFrameBasePage it works just fine, with or without the actual page name in the callback path.

I am so beat down by this. Completely out of ideas.

Some additional info is that I'm using my direct IP in the callback url. Is there any possibility since I don't really have a domain name this could be a problem? For instance, I use http://xx.xxx.xxx.171/MyApp/ as opposed to http://MyCompany/MyApp/. Again, the CanvasIFrameBasePage is found, so I'm guessing this isn't it.
If someone could just confirm whether or not they can get something like the sample I cited to work, that would be a huge help to me. I am so close I'm really getting the sense that somewhere I've set something up wrong - something stupid.

Thanks



Tiradentes wrote:
Dou you have 'http://xx.xxx.xxx.171/MyApp/DefaultFBML.aspx' somewhere in you app settings?

Feb 7, 2008 at 11:23 AM
I think I may have found the answer, I got it to work using FaceBook.Net, but I bet this will solve the problem for the FB Dev Toolkit as well:

http://www.codeplex.com/FacebookNET/Thread/View.aspx?ThreadId=21684


Feb 8, 2008 at 4:25 AM
lgndrytoe, Did you get this resolved yet?

I just set up an application with an invite page and everything works fine. I think you may have some config settings wrong in FB.

My Callback url is http://ipaddress/myapp/

FBML Canvas page url is http://apps.facebook.com/myapp/

My post install url is CanvasFBMLBasePage at http://apps.facebook.com/myapp/installed.aspx which has the FBML to invite friends.

<fb:request-form action="http://apps.facebook.com/myapp/" method="POST" invite="true" type="MyApp" content="...." >
<fb:multi-friend-selector actiontext="Select the friends you want to invite." rows="5" bypass='<asp:Literal runat="server" ID="litBypass" />' exclude_ids='<asp:Literal runat="server" ID="litExcludedIds" />' />
</fb:request-form>

Which on skip/cancel/invite friends brings the user to the default page of the app.

Does that help?

Feb 8, 2008 at 3:35 PM
kmarshall,

I think I finally figured out what I needed. I actually got it to work with Facebook.Net, but I think my problem was configuration, as you guessed, and had nothing to do with the FB Dev Toolkit. I eventually had to configure things like:

Here's how I had to have things set up:

Callback URL: http://76.xxx.xx.171/helloworldfbml/

Side Nav URL: http://76.xxx.xx.171/helloworldfbml/default.aspx <------- This is the KEY change that took me 10 hours over 2 days to get around to trying!


It looks like your example posts back to the same page, and I was trying to post my info to a 2nd page "DefaultFBML2.aspx" :

<%@ Page Language="C#" AutoEventWireup="false" CodeFile="DefaultFBML.aspx.cs" Inherits="DefaultFBML" %>
<fb:fbml>
<asp:label id="lblDashboard" runat="server"></asp:label>

<fb:request-form action="DefaultFBML2.aspx" method="POST" type="bretts hello world" content="hi there" >

<fb:multi-friend-selector

actiontext="Invite some people" />

</fb:request-form>
</fb:fbml>

Once i was configured as shown, I got things to work as I needed (for now).

Hope this saves someone else some pain.


kmarshall wrote:
lgndrytoe, Did you get this resolved yet?

I just set up an application with an invite page and everything works fine. I think you may have some config settings wrong in FB.

My Callback url is http://ipaddress/myapp/

FBML Canvas page url is http://apps.facebook.com/myapp/

My post install url is CanvasFBMLBasePage at http://apps.facebook.com/myapp/installed.aspx which has the FBML to invite friends.

<fb:request-form action="http://apps.facebook.com/myapp/" method="POST" invite="true" type="MyApp" content="...." >
<fb:multi-friend-selector actiontext="Select the friends you want to invite." rows="5" bypass='<asp:Literal runat="server" ID="litBypass" />' exclude_ids='<asp:Literal runat="server" ID="litExcludedIds" />' />
</fb:request-form>

Which on skip/cancel/invite friends brings the user to the default page of the app.

Does that help?