1 Reply Latest reply on Jan 6, 2011 12:27 PM by Astraport2012

    Facebook - invite friends and payment for virtual goods

    Astraport2012

      Couldn`t show the code examples as possible to invite friends from Facebook Flex (iframe) app? There is only a description of how to do it for JS.
      More interested in the question of reception Facebook credits for virtual currency within my app.
      Thanks in advance.

        • 1. Re: Facebook - invite friends and payment for virtual goods
          Astraport2012 Level 1

          I tried to use the method 'friends.get' from old REST API (http://developers.facebook.com/docs/reference/rest/friends.get/)

           

          import com.facebook.graph.Facebook;
          protected function button1_clickHandler(event:MouseEvent):void
                      {
                          Facebook.callRestAPI('friends.get', listFreinds);
                      }
          protected function listFreinds(event:ResultEvent):void
                      {
                          fr.text = event.result.toString();
                      }

          but it gives an error:

           

          ArgumentError: Error #1063: Argument count mismatch on FacebookUserStatusWeb/listFreinds(). Expected 1, got 2.

          atcom.facebook.graph.core::AbstractFacebook/handleRequestLoad()[/Users/sebastianderossi/Do cuments/projects/facebook_new/api/com/facebook/graph/core/AbstractFacebook.as:108]
          atcom.facebook.graph.net::FacebookRequest/dispatchComplete()[/Users/sebastianderossi/Docum ents/projects/facebook_new/api/com/facebook/graph/net/FacebookRequest.as:411]
          atcom.facebook.graph.net::FacebookRequest/handleDataLoad()[/Users/sebastianderossi/Documen ts/projects/facebook_new/api/com/facebook/graph/net/FacebookRequest.as:402]
          atcom.facebook.graph.net::FacebookRequest/handleURLLoaderComplete()[/Users/sebastiandeross i/Documents/projects/facebook_new/api/com/facebook/graph/net/FacebookRequest.as:380]