
Those are hard times. Facebook discontinued support for Notifications.send method March 1, 2010. Calling this method returns error code 3 (Unknown method). Instead, developers are directed to use other communication channels. From those some are not yet even a part of facebook-actionscript-api yet (dashboard) other not published from facebook (invites) and those that may work via api are experimental and may change any day (activities).
Excluding streams as communication channel, the only usable way, these days, to acquire some new facebook application users is using <Fb:request-form> (part of FBML). When your application is IFrame, you may find interesting that you are able to use FBML within your HTML files. In order to make this happen, you have to use <Fb:serverFbml> (renders the FBML on a Facebook server inside an iframe). Now, lets see how to open request form in your Facebook Iframe application:
First thing you need is Cross Domain Communication Channel file . It is simple static file, you should name it xd_receiver.htm
<!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>
<title>Cross-Domain Receiver Page</title>
</head>
<body>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js?2" type="text/javascript"></script>
</body>
</html>
now your application index.html file with request form:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head></head>
<body>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function()
{
FB_RequireFeatures(["XFBML"], function()
{
FB.Facebook.init("*YOUR*API*KEY*HERE*", "xd_receiver.htm");
});
};
</script>
<fb:serverFbml style="width: 750px;">
<script type="text/fbml">
<fb:fbml>
<fb:request-form action="http://www.google.com" method="POST" invite="true" type="TestApp"
content="Join my app <fb:req-choice url="http://apps.facebook.com/facebookyoztest/" label="Go Test app" />">
<fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use Test app.">
</fb:request-form>
</fb:fbml>
</script>
</fb:serverFbml>
</body>
</html>
Place both files in the same folder (or specify xd_receiver.htm path correctly in FB.Facebook.init() function). Now make sure you setup your application correctly:
Canvas Callback URL: http://facebook.yoz.sk/Test/ Connect URL: http://facebook.yoz.sk/Test/ Base Domain: yoz.sk Canvas URL: http://apps.facebook.com/facebookyoztest/ FBML/iframe: iframe Application Type: Website
Now request form should be generated when you visit canvas url.

Important:
- Your application must be iframe type
- URLs used in this article are not to be used in your apps
- This article was written and is valid on March 9, 2010
Continue reading:




