kennylerma / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

Login with facebook account, on-click button, nothing happens #260

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Flex RIA
2. Connect button
3. When I click the loginwithfacebook button, nothing happens
   I followed this tutorial: http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt3.html

What is the expected output? What do you see instead?
To login with your facebook account, to show your name, picture, status 

What version of the product are you using? On what operating system?
FlashBuilder CS5, Windows 7 64 bit

Please provide any additional information below.

Original issue reported on code.google.com by covemaek...@gmail.com on 23 Feb 2011 at 9:31

GoogleCodeExporter commented 9 years ago
This is a very vague issue. Can you please provide some code?

Original comment by rovertn...@gmail.com on 23 Feb 2011 at 9:52

GoogleCodeExporter commented 9 years ago
This problem is solved, but now a new problem occured.

This is the code:

protected function loginHandler(success:Object,fail:Object):void
{
    if(success){    
            currentState="LoggedIn"; 
            Facebook.api('/me',getMeHandler);
            userImg.source=Facebook.getImageUrl(success.uid,"small");                    Facebook.api('/me/statuses',getStatusHandler);Alert.show(success.toString());
                    nameLbl.text=success.user.name;
                }
            }
            protected function      getMeHandler(result:Object,fail:Object):void{

                nameLbl.text=result.user.name;
                birthdayLbl.text=result.user.birthday;
            }

The image and the status are displayed succesfully.
But the name and birthday label aren't.

This is the error:
TypeError: Error #1010: Een term is ongedefinieerd en heeft geen eigenschappen.
    at FacebookUserStatusWeb/getMeHandler()[C:\Users\Mathijs Covemaeker\Desktop\Televic\facebooklogin\FLEX\FacebookUserStatusWeb\src\FacebookUserStatusWeb.mxml:38]
    at com.facebook.graph.core::AbstractFacebook/handleRequestLoad()[C:\Users\MikeHunt\Work\facebookGraphApi\trunk\api\com\facebook\graph\core\AbstractFacebook.as:108]
    at com.facebook.graph.net::FacebookRequest/dispatchComplete()[C:\Users\MikeHunt\Work\facebookGraphApi\trunk\api\com\facebook\graph\net\FacebookRequest.as:411]
    at com.facebook.graph.net::FacebookRequest/handleDataLoad()[C:\Users\MikeHunt\Work\facebookGraphApi\trunk\api\com\facebook\graph\net\FacebookRequest.as:402]
    at com.facebook.graph.net::FacebookRequest/handleURLLoaderComplete()[C:\Users\MikeHunt\Work\facebookGraphApi\trunk\api\com\facebook\graph\net\FacebookRequest.as:380]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

It says: "A term is not defined and has no properties.
So the result object is null in the getmehandler().

A big thanks to the person that solves this problem!!:)

Original comment by covemaek...@gmail.com on 24 Feb 2011 at 8:40

GoogleCodeExporter commented 9 years ago
Problem solved

Original comment by covemaek...@gmail.com on 24 Feb 2011 at 1:21

GoogleCodeExporter commented 9 years ago

Original comment by rovertn...@gmail.com on 24 Feb 2011 at 4:06