Решил освоить фейсбук на предмет создания приложений. Тестовое приложение нормально логинится, инициализируется.
1. Пробую так:
Facebook.api("/me/friends",getFreinds);<br/>
<br/>
protected function getFreinds(result:Object, fail:Object):void<br/>
{<br/>
trace ('result2' + result.id); //undefined<br/>
}
2. Пробую так:
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/>
}
Ошибка:
ArgumentError: Error #1063: Argument count mismatch on FacebookUserStatusWeb/listFreinds(). Expected 1, got 2.
atcom.facebook.graph.core::AbstractFacebook/handleRequestLoad()[/Users /sebastianderossi/Documents/projects/facebook_new/api/com/facebook/gra ph/core/AbstractFacebook.as:108]
atcom.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]