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 6383097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:36:25+00:00 2026-05-25T02:36:25+00:00

I am using the new FB.ui to create an request to friends on Facebook

  • 0

I am using the new FB.ui to create an request to friends on Facebook for my application.

The user is show a panel with their friends and they select the ones they want to send the request.

On the callback I can access the request_id and now I want to get the details for the users that were invited.

If I paste the following code in the browser I can get the user_id of the invited user which is the info I want:

https://graph.facebook.com/138744992885393?access_token=193078857407882|d0048a9beb58a9a247c6b987.0-751640040|zNmBLfZxBBKikoj8RlZiHfKpugM

What I want to be able to do is do the same thing but from my code and then access the information returned.

Here is my code:

    function sendRequests() {
        FB.ui({
            method: 'apprequests',
            message: ' should learn more about this awesome site.',
            data: 'extra data'
        }, function(response) {
            if (response != null && response.request_ids && response.request_ids.length > 0) {
                for (var i = 0; i < response.request_ids.length; i++) {
                    alert("Invited: " + response.request_ids[i]);
// somehow send a request to Facebook api to get the invited user id from the request_id   and save to the database                 
//can save these id's in the database to be used to track the user to the correct page in application.

                }
             top.location.href="http://localhost:3000/";
            } else {
                alert('No invitations sent');
            }
        });
    }

How can I do this?

I am using Rails 3.0.7 Ruby 1.9.2

  • 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-25T02:36:25+00:00Added an answer on May 25, 2026 at 2:36 am

    You can get the facebook user ID as follows:

    for (var i = 0; i < req_ids.length; i++) {
    
            alert("Invited: " + req_ids[i]);
            FB.api('/me/apprequests/?request_ids='+toString(req_ids[i]),
            function(response)
            { alert(response);
                alert(response['data'][0]['from']['id']);
                });
    
                                   }
    

    Thanks very much to this post on stackoverflow

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

Sidebar

Related Questions

I want to create a new object using Class::DBI. One of the fields of
I'm using the new RichTextBox control in SL4Beta and want to create styles for
I'm using Visual Basic 9 (VS2008) I want to create new Tabs as and
How exactly can I create a new directory using Emacs? What commands do I
I am trying to create a new contact using Dynamic Entity. The sample i
I am trying to create a new dict using a list of values of
I am trying to create a new branch using the API, and have used
I have a PHP script where I create a new process using proc_open().It executes
I am using Excel VBA 2003. Is it possible to create new recordset by
Is it forbidden or not a best practice to create objects using new. Creating

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.