Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

shamy90825337
Level 1
Level 1

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.

0 Replies