Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to solve null object reference after instantiate FacebookSessionUtil
    primarykey
    data
    text
    <p>I think you can help me out from this little problem.</p> <p>I am a novice in Facebook developer by choosing ActionScript 3 as my developer platform. I use SWC library from <a href="http://code.google.com/p/facebook-actionscript-api/" rel="nofollow noreferrer">official facebook-actionscript-api</a> that promoted by Adobe.</p> <p>So I followed their tutorial. So I did following instruction:</p> <ol> <li>Create Flex project.</li> <li>Download and put <code>Facebook_library_v3.4_flex.swc</code> to <code>\lib</code> in Flex project.</li> <li><p>Provide following code:</p> <pre><code> import com.facebook.Facebook; import com.facebook.utils.FacebookSessionUtil; private var fbook:Facebook; private var session: FacebookSessionUtil; protected var api_key : String = "my-facebook-app-api-key"; protected var secret_key : String = "my-facebook-app-secret-key"; public function init() : void { //fbook = new Facebook(); session=new FacebookSessionUtil(api_key,secret_key,this.loaderInfo); var fbook : Facebook = session.facebook; session.validateLogin(); } </code></pre> <p>After trying to run debug session. I got the error after execute this statement:</p> <p>session=new FacebookSessionUtil(api_key,secret_key,this.loaderInfo);</p></li> </ol> <p>I think I did something wrong but I couldn't figure it out. Could you help me by giving your advice or any guideline?</p> <p>This is exception I got:</p> <pre><code>TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.facebook.utils::FacebookSessionUtil()[C:\Users\MikeHunt\Work\FacebookAPI\src\com\facebook\utils\FacebookSessionUtil.as:128] at CheeseZaa/init()[/Users/teerasej/Documents/Flex Builder 3?/freelance/CheeseZaa/src/CheeseZaa.mxml:24] at CheeseZaa/___CheeseZaa_Application1_creationComplete()[/Users/teerasej/Documents/Flex Builder 3?/freelance/CheeseZaa/src/CheeseZaa.mxml:4] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9440] at mx.core::UIComponent/set initialized()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1168] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8744] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8684] </code></pre> <p>I notice that the first line of exception show this:</p> <pre><code>com.facebook.utils::FacebookSessionUtil()[C:\Users\MikeHunt\Work\FacebookAPI\src\com\facebook\utils\FacebookSessionUtil.as:128] </code></pre> <p>But I don't sure it involve in exception.</p> <p>My development platform is:</p> <ul> <li>Macbook Pro</li> <li>OSX Snow Leopard 10.6</li> <li>Flash Player 10.0.32 Debugger</li> <li>Mozilla Firefox 3.6</li> <li>Flex builder 3.2</li> <li>Flex SDK 3.5</li> <li>Facebook_library_v3.4_flex.swc</li> </ul> <p>Every suggestion and guideline would be thank you. I think this would be good for other developer that may found the same problem like me.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload