In my current .NET and FBML-based facebook app, I have some code that looks like this:
<fb:request-form
action="http://mysite.com/InvitesSent.aspx"
method="POST"
invite="true"
type="SomeType"
content="Here is an invite to <fb:req-choice url='http://mysite.com?<%=Params %>' label='My site' />">
<fb:multi-friend-selector
max="20"
actiontext="Invite your friends!"
showborder="false"
rows="4"
bypass="cancel"
email_invite="false"
exclude_ids="" />
</fb:request-form>
This pops up the multi-friend selector on my site from which the user selects some friends and presses 'send invitations' at which point the user is redirected to http://mysite.com/InvitesSent.aspx.
At the other end, the recipients of the invite see a notification with an 'Accept' button. When the button is pressed, facebook redirects immediately to my site with
http://www.facebook.com/l.php?u=http%3A%2F%2Fmysite.com%3F ...
which is facebook's external link redirect thing. This redirect includes the parameters I supplied in the fb:req-choice url attribute.
My question is this: Since FBML is due to be discontinued, how do I achieve this behaviour in the Javascript SDK?
I can send notifications with FB.ui and apprequest, but I don't appear to be able to tack on parameters to the URL as I can in FBML. I need this since I wish to reward the inviter and for that I need to be able to track individual requests.
Is any of this even possible in the new SDK? The documentation is confusing and sometimes makes distinctions between requests and invites, and sometimes not. To be honest, I'm not really sure if there is a difference, I'm just clinging on to clues in the FBML such as 'invite="true"' that might help me to divine a solution.