Highlighted

Facebook post using action script 3.0 gives cannot access a property or method of a null object reference error

shamy90825337

05-04-2015

Hello,

Subject : 

Facebook post using action script 3.0 gives cannot access a property or method of a null object reference error

Hello,

I am using flex 4.5. I have created FBConnect custom function to connect facebook.  I am using facebook graph API in my project.

But while calling facebook.init method I get the "cannot access a property or method of a null object reference" error.

I am using following code

import com.facebook.graph.Facebook;

public function FBConnect():void

                                    {  

                                                //Set applicationid

                                                var _applicationID:String = "XXXXXXXXXXXXXX";

                                               

                                                //Set permissions to ask for

                                                var _extendedPermissions = {perms:"read_stream, publish_stream, user_about_me, read_friendlists, user_photos"};

                                               

                                                Facebook.init(_applicationID,initCallback);

                                               

                                    }

Below screen shot shows error detail:
Image 2.gif

Please let me know how can I fix this error.