0 Replies Latest reply on Apr 15, 2011 1:43 PM by Lady Lilly

    Problem with Request for Permissions (mobile app)

    Lady Lilly

      In my application I want to publish the results of the games on facebook. I used this tutorial: http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.html

       

      Here is a fragment of my source code:

       

      <fx:Script>
              <![CDATA[
                  import com.facebook.graph.FacebookMobile;
                 
                  import mx.events.Request;
                 
                  import valueObjects.GlobalVariables;
                 
                  protected var extendedPermissions:Array = ["publish_stream","user_website","user_status","user_about_me"];
                 protected function initApp():void
                  {
                      FacebookMobile.init("app ID",loginHandler);
                  }
                  protected function loginHandler(success:Object,fail:Object):void
                  {
                      if(success){   
                          currentState="loggedin";
                          nameLbl.text=success.user.name;
                          userImg.source=FacebookMobile.getImageUrl(success.uid,"small");
                          birthdayLbl.text=success.user.birthday;
                          FacebookMobile.api("/me/statuses",getStatusHandler);
                      }
                      else{   
                          this.login();
                      }
                  }
                  protected function login():void
                  {
                      FacebookMobile.login(loginHandler, stage, []);
                  }
                  protected function logout():void
                  {
                      FacebookMobile.logout();
                      currentState="loggedout";
                  }
                  protected function getStatusHandler(result:Object, fail:Object):void
                  {
                      statusLbl.text=result[0].message;
                  }
                  protected function submitPost():void
                  {
                      FacebookMobile.api("/me/feed",submitPostHandler,{message:GlobalVariables.d.toString()}, "POST");
                  }
                  protected function submitPostHandler(result:Object,fail:Object):void
                  {
                      FacebookMobile.api("/me/statuses",getStatusHandler);
                  }
              ]]>
          </fx:Script>

       

       

      I have problem with permissions. After login I see a white screen instead of request for permissionThe desktop application does not have a problem with it. When I log for the first time to the desktop application and I will give the permissions applications, then in the mobile application everything works fine. But this is not a good solution. And so please help.