Action in fb:request form is always null

860 views Asked by At

UPDATE: this has just started happening again, would appreciate any help.

I am using server fbml to render an Invite Friends iframe and it was working fine up until two days ago. Basically, after submitting the form, a java action should be invoked where I get all the id's of the user's invited.

However, I now notice that an "invite by email" popup is showing up and, most importantly, my java action isn't being hit at all. When I inspect the form in firebug, I notice that the action is always empty (though all other parameters are preserved correctly).

I've tried setting email_invite=false on the multi-friend-selctor but to no avail.

My code looks like the following:

    <fb:fbml> 
        <fb:request-form action="http://localhost:8080/myAction.do?method=someAction" method="POST" invite="false" target="_top" type="invite" content="CONTENT_GOES_HERE" > 
            <fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use our app." target="_top" email_invite="false"> 
        </fb:request-form> 
    </fb:fbml>

</script>

Any help would be greatly appreciated on this.

UPDATE: this has just started happening again, would appreciate any help.

Thanks, gearoid.

4

There are 4 answers

0
Gerard On BEST ANSWER

I had an incorrect appId set in the fb-root javascript. This caused the error.

0
Cristián Sepúlveda On

To prevent that popup appearing add this attribute to the multi friend selector import_external_friends="false"

1
Cyphus On

Facebook have recently added an extra step into the multi-friend selector process, which is what you're seeing. There isn't, as far as I know, any way to stop this from appearing.

However, you should still be getting the result of the selector sent to you once the user navigates away from the "invite by email" popup.

Facebook's latest update can be seen in this status post.

1
trcarden On

Turns out this can happen a lot of different ways.

A) You can call FB.init multiple times

B) Call FB.init with the wrong key

C) You can supply a action that doesn't map to your current application on facebook

D) You or your staff can accidentially supply the same canvas/app url for two apps.

Most of of the solutions online point at A-C. When someone accidentally creates a second dev app pointing at localhost or 127.0.0.1 as the canvas url for multiple apps you admin you will get hosed. Took me hours upon hours to think to search our other apps. So i hope this saves someone a truck load of time. Cheers