facebook actionscript图形api-使用request_ids检索用户

|| 如果我使用Facebook.ui()允许用户选择一堆朋友,请问如何使用返回的request_ids数组访问朋友/提要? 我尝试了以下方法:
Facebook.ui(\"apprequests\", { message:\"select some friends\" }, handleAppRequest, \"iframe\");
允许选择朋友来讲述该应用程序。然后,我执行以下操作:
private function handleAppRequest(result:Object):void
{
    Debug.logObject(result, this, \"handleAppRequest\");

    for (var i:int = 0; i < result.request_ids.length; i++)
    {
        var requestID:String = result.request_ids[i];
        Facebook.api(\"/\" + requestID, handleRequestFriends); 
    }
}
选择结果对象中返回的朋友(我认为这可能是我出问题的地方),然后返回失败:
private function handleRequestFriends(success:Object, fail:Object):void
{
    if (success) trace(\"success\");
    else trace(fail);
}
提前致谢 OB 编辑:(新用户无法回答自己的问题) 嘿,米歇尔 啊,我明白了 应该是以下内容:
Facebook.ui(\"apprequests\", { message:\"select some friends\" }, handleAppRequest, \"iframe\");

private function handleAppRequest(result:Object):void
{
    for (var i:int = 0; i < result.request_ids.length; i++)
    {
        var requestID:String = result.request_ids[i];
        Facebook.api(\"/\" + requestID, handleRequestFriends); 
    }
}

private function handleRequestFriends(success:Object, fail:Object):void
{
    if (success)
    {
        var values:Object = 
        { 
            access_token:Facebook.getSession().accessToken,
            name:\"This is my title\",
            link:\"http://example.com\",
            picture:\"http://example.com/facebook/facebooktutorial/canvas/images/icon-75x75.gif\",
            caption:\"this is a caption\",
            message:\"This is a test message on \" + new Date().toString()
        };

        var friendID:String = success.to.id;
        Facebook.api(\"/\" + friendID + \"/feed\", handleSubmitFeed, values, URLRequestMethod.POST);
    }
    else
    {
        Debug.logObject(fail, this, \"handleRequestFriends\");
    }
}
一个问题问-我可以使用Facebook好友选择器并仅返回结果而无需向他们发出请求吗? 谢谢 OB     
已邀请:
我会再次建议您使用参数来发送您的access_token,就像您上一个问题一样:)
private function handleAppRequest(result:Object):void
{
    Debug.logObject(result, this, \"handleAppRequest\");

    for (var i:int = 0; i < result.request_ids.length; i++)
    {
        var requestID:String = result.request_ids[i];
        var _params:Object = new Object();
        _params.access_token = Facebook.getSession().accessToken;
        Facebook.api(\"/\" + requestID, handleRequestFriends, _params, \"GET\"); 
    }
}
我认为您正在尝试吸引用户,因为如果您想发布到他们的供稿,则应该使用
var _params:Object = new Object();
_params.access_token = Facebook.getSession().accessToken;
_params.message = _message;
Facebook.api(\"/\" + requestID + \"/feed\", handleRequestFriends, _params, \"POST\"); 
编辑:btw:您确定您使用此方法获得正确的ID? (以前没有访问过朋友列表,所以我不知道)。     

要回复问题请先登录注册