Select to view content in your preferred language

Flex OAuth Sample does not send search query

1824
1
04-30-2013 05:32 AM
MathieuVILLEMONT1
Deactivated User
Hi,

I have downloaded the Flex OAuth Sample onto my webserver. I manage to login to ArcGIS Online and it redirects to my page successfully but none of my portal content is displayed.
It seems no search query is sent (the online sample with the same credentials works fine though).
Any ideas ?

Thanks

Mat
Tags (2)
0 Kudos
1 Reply
MehulChoksey
Esri Contributor
Thanks for reporting this bug.
To workaround this issue,

Add the code in the sample marked in RED as shown below:

1.  In application_preinitializeHandler,  add portal.load() just above portal.signIn(); 
    
    // load the portal
     portal.load()
     portal.signIn();




2.

private function portal_loadHandler(event:PortalEvent):void
            {
                signOutButton.visible = true;
                if(portal.signedIn)
                {
                    var user:PortalUser = portal.user;
                    helloLabel.text = "Welcome " + user.fullname;
                    
                    var queryParams:PortalQueryParameters = new PortalQueryParameters(null, 20, "numViews", "desc");
                    queryParams.ofUser(user.username);
                    queryCallResponder.token = portal.queryItems(queryParams);
                }
            }
0 Kudos