0 Replies Latest reply on Sep 15, 2010 6:20 AM by flexJu

    Air and facebook

    flexJu Level 1

      Hello,

      I have a litlle problem while trying to upload feeds and pictures and video form my application to facebook.

       

      I success on connecting to facebook, but when I try to upload stuff, that fails, and whithout any error message so I can't debug.

       

      I follow the sample in PhotoUploader_AirDemo but it fails.

       

      Here is the code I use for the upload of a picture:

       

      //listeners for connecting to facebook

      private function handle_connect(event:FacebookEvent):void

      {

      facebookSession.validateLogin();

      }

      //Publish a text or a picture or a movie to facebook

      public function shareToFacebook():void

      {

      facebookSession=new FacebookSessionUtil("**********","********",stage.loaderInfo);

      facebookSession.addEventListener(FacebookEvent.CONNECT, handle_connect);

      facebookSession.login();

      snapshot=new BitmapData(400,300);

      snapshot.draw(this);

      image.source=snapshot;

      fb=facebookSession.facebook;

      fb.post(new UploadPhoto(snapshot,"", "me at work"));

      }

       

      If someone has an idea or a code that works, that will help me a lot.

      Thanks

      Julien