Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4335356
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:39:30+00:00 2026-05-21T10:39:30+00:00

If I have used Facebook.ui() to allow the user to select a bunch of

  • 0

If I have used Facebook.ui() to allow the user to select a bunch of their friends, how can I use the returned request_ids array to access the friends /feeds please?

I’ve tried the following:

Facebook.ui("apprequests", { message:"select some friends" }, handleAppRequest, "iframe");

which allows the selection of friends to tell about the app. I then do the following:

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); 
    }
}

to select the friends returned in the result object (which I think might be where I’m going wrong), and then this returns a fail:

private function handleRequestFriends(success:Object, fail:Object):void
{
    if (success) trace("success");
    else trace(fail);
}

Thanks in advance
ob

EDIT: (new users can’t answer their own question)

Hey again Michiel

ah i got it

it should be the following:

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");
    }
}

One question tho – can i use the facebook friend selector and just return the results without the apprequest firing off to them?

thanks
ob

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:39:31+00:00Added an answer on May 21, 2026 at 10:39 am

    i would again suggest that you use the params to send your access_token, like in your previous question 🙂

    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"); 
        }
    }
    

    and i assume you are trying to get the user, because if you want to post to their feed, you should just use

    var _params:Object = new Object();
    _params.access_token = Facebook.getSession().accessToken;
    _params.message = _message;
    Facebook.api("/" + requestID + "/feed", handleRequestFriends, _params, "POST"); 
    

    edit: btw: are you sure you are getting the right id’s with this method? (haven’t accessed friends list before, so i have no idea).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Facebook 3.1 and try comment on a particular post. I have used
I have used facebook to allow users to log into a site. The page
Facebook allows you to create test user accounts that can only be used for
I've used this code to have a like btn on my site: <iframe src=http://www.facebook.com/plugins/like.php?href=URL_OF_YOUR_WEBSITE&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=80&amp
I have used Facebook Connect in my site but it is not working properly.
I have an iframe tab in facebook. I used overflow:hidden in the body tag
Goal: Allow a user to authentication with Facebook into an iOS application which requires
I have a web app that allows users to tie their Facebook account to
I have a view that's used to display Comments. You can obviously comment from
Our site uses Facebook Connect to allow users to post updates to their Facebook.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.