V
V
Volgarastraport2011-01-07 10:48:48
Facebook
Volgarastraport, 2011-01-07 10:48:48

Facebook - how to invite friends using Graph API from AS3 (Flex application)?

I decided to master Facebook for creating applications. The test application normally logs in, initializes.
1. I try like this:

Facebook.api(&quot;/me/friends&quot;,getFreinds);<br/>
 <br/>
 protected function getFreinds(result:Object, fail:Object):void<br/>
 {<br/>
 trace ('result2' + result.id); //undefined<br/>
 }

2. I try like this:
protected function button1_clickHandler(event:MouseEvent):void<br/>
 {<br/>
 Facebook.callRestAPI('friends.get', listFreinds);<br/>
 }<br/>
 protected function listFreinds(event:ResultEvent):void<br/>
 {<br/>
 fr.text = event.result.toString();<br/>
 }

Error:
ArgumentError: Error #1063: Argument count mismatch on FacebookUserStatusWeb/listFreinds(). Expected 1,
got
2 .facebook.graph.net::FacebookRequest/dispatchComplete()[/Users/se bastianderossi/Documents/projects/facebook_new/api/com/facebook/graph/ net/FacebookRequest.as:411]
atcom.facebook.graph.net: :FacebookRequest/handleDataLoad()[/Users/seba stianderossi/Documents/projects/facebook_new/api/com/facebook/graph/ne t/FacebookRequest.as:402]
atcom.facebook.graph.net::FacebookRequest/handleURLLoaderComplete()[/U sers/sebastianderossi/Documents/projects/facebook_new/api/com/facebook /graph/net/FacebookRequest.as:380]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question