Simple Facebook app stopped working: 'swf' is null or not an object
===

I recently followed a tutorial on the Adobe website to create a Facebook app using Flex then created a very basic app, which just displays the information it receives so that people can see what information is shared when you allow basic authorisation to an app. It has recently started showing errors and I cannot find a reason.

At first it did nothing in Internet Explorer and IE debugger showed an error of "**Error: 'swf' is null or not an object**", but it continued to work in other browsers. I tried editing the page in numerous ways, but reverted back to the original when it still did not work. Soon Flash (debugger version) started giving intermittent errors in other browsers:

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at FacebookUserStatusWeb/getMeHandler()    
    at com.facebook.graph.core::AbstractFacebook/handleRequestLoad()    
    at com.facebook.graph.net::AbstractFacebookRequest/dispatchComplete()    
    at com.facebook.graph.net::AbstractFacebookRequest/handleURLLoaderIOError()    
    at flash.events::EventDispatcher/dispatchEventFunction()    
    at flash.events::EventDispatcher/dispatchEvent()    
    at flash.net::URLLoader/onComplete()

The app is here:

http://fbdev.x10.bz/fbdev/FBUserInfo/index.html

I uploaded a very basic version of the webpage with the app on it, but it has the same errors:

http://fbdev.x10.bz/fbdev/bin-release/

I want to make another Facebook app, but need to know why this is not working. This is the source code for the swf:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    			   xmlns:s="library://ns.adobe.com/flex/spark"
    			   xmlns:mx="library://ns.adobe.com/flex/mx"
    			   width="600" height="300" backgroundAlpha="0"
    			   creationComplete="application1_creationCompleteHandler(event)"
    			   preloaderChromeColor="#FFFFFF">
    	
    	<fx:Style source="assets/FBUser.css"/>
    	
    	<fx:Script>
    		<![CDATA[			
    			import com.facebook.graph.Facebook;
    			
    			import mx.events.FlexEvent;
    				
    			protected function application1_creationCompleteHandler(event:FlexEvent):void
    			{
    				Facebook.init("225217197575675", loginHandler);
    			}
    			
    			protected function loginHandler(success:Object, fail:Object):void
    			{
    				if (success)
    				{
    					currentState="loggedin";
    					Facebook.api("/me", getMeHandler);
    					userImg.source=Facebook.getImageUrl(success.uid, "small");
    				}
    			}
    			
    			protected function login():void 
    			{
    				Facebook.login(loginHandler);
    			}
    			
    			protected function logout():void
    			{
    				Facebook.logout(logoutHandler);
    				currentState="loggedout";
    			}
    			
    			protected function logoutHandler(response:Object):void
    			{
    				
    			}
    			
    			private function getMeHandler(result:Object,fail:Object):void
    			{
    				nameLbl.text=result.name;
    				genderLbl.text=result.gender;
    				idLbl.text=result.id;
    				last_nameLbl.text=result.last_name;
    				linkLbl.text=result.link;
    				localeLbl.text=result.locale;
    				timezoneLbl.text=result.timezone;
    				updated_timeLbl.text=result.updated_time;
    				usernameLbl.text=result.username;
    				verifiedLbl.text=result.verified;
    				infoForm.visible = true;
    			}
    		
    		]]>
    	</fx:Script>
    	
    	<s:states>
    		<s:State name="loggedout"/>
    		<s:State name="loggedin"/>
    	</s:states>
    	
    	<fx:Declarations>
    		<!-- Place non-visual elements (e.g., services, value objects) here -->
    	</fx:Declarations>
    	<s:controlBarContent.loggedin>
    		<fx:Array></fx:Array>
    	</s:controlBarContent.loggedin>
    
    		<s:Rect id="topMaskRect" top="0" height="30" left="0" width="100%" topRightRadiusX="15" topLeftRadiusX="15">
    			<s:fill>
    				<s:SolidColor color="#4C6AA9"/>
    			</s:fill>
    		</s:Rect>
    	
    	<s:Button id="loginoutBtn" right="20" top="5" label="Logout" skinClass="skins.loginOutBtn"
    			  click.loggedin="logout()"
    			  label.loggedout="Login" click.loggedout="login()"
    			  chromeColor="#FFFFFF"
    			  fontWeight="bold"/>
    	
    	<s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask" >
    
    	<s:Form id="infoForm" includeIn="loggedin" visible="true" x="81" y="50" verticalCenter="0">
    		<s:FormItem label="name" >
    			<s:Label id="nameLbl"/>
    		</s:FormItem>
    		<s:FormItem label="gender">
    			<s:Label id="genderLbl"/>
    		</s:FormItem>
    		<s:FormItem label="id">
    			<s:Label id="idLbl"/>
    		</s:FormItem>
    		<s:FormItem label="last_name">
    			<s:Label id="last_nameLbl"/>
    		</s:FormItem>
    		<s:FormItem label="link">
    			<s:Label id="linkLbl"/>
    		</s:FormItem>
    		<s:FormItem label="locale">
    			<s:Label id="localeLbl"/>
    		</s:FormItem>
    		<s:FormItem label="timezone">
    			<s:Label id="timezoneLbl"/>
    		</s:FormItem>
    		<s:FormItem label="updated_time">
    			<s:Label id="updated_timeLbl"/>
    		</s:FormItem>
    		<s:FormItem label="username">
    			<s:Label id="usernameLbl"/>
    		</s:FormItem>
    		<s:FormItem label="verified">
    			<s:Label id="verifiedLbl"/>
    		</s:FormItem>
    	</s:Form>
    		
    	<s:Image id="userImg" includeIn="loggedin" x="10" y="30"/>
    		
    	</s:Group>
    	    	
    	<s:Group horizontalCenter="0" verticalCenter="0" includeIn="loggedout">
    		<s:layout>
    			<s:TileLayout verticalGap="15"/>
    		</s:layout>
    		
    	<s:Label width="200" fontWeight="bold"
    			 text="Log in to Facebook see what information you are disclosing when you allow basic authorisation to a Facebook app"
    			 textAlign="center" verticalCenter="0"/>
    	<s:Label y="155" width="200" fontSize="11" fontWeight="normal"
    			 text="(This app does not store or share any information, it is used purely for display purposes)"
    			 textAlign="center"/>
    	</s:Group>
    	
    	<s:Rect id="btmMaskRect" bottom="0" height="30" left="0" width="100%" bottomRightRadiusX="15" bottomLeftRadiusX="15">
    		<s:fill>
    			<s:SolidColor color="#4C6AA9"/>
    		</s:fill>
    	</s:Rect>
    	
    </s:Application>


Does anyone know what could be causing this?