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

  • Home
  • SEARCH
  • 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 6846995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:41:26+00:00 2026-05-27T00:41:26+00:00

What i want to do is get the request ID and insert to my

  • 0

What i want to do is get the request ID and insert to my database. My request dialog is run well, but the problem is I cannot get ‘TO’ user id http://developers.facebook.com/docs/reference/dialogs/requests/ , but I still cannot get the request user ID.

here is my coding:

         function newInvite(){
            //var user_ids = document.getElementsByName("user_ids")[0].value;
           FB.ui({ 
                    method : 'apprequests',
                    title: 'X-MATCH',
                    message: 'Come join US now, having fun here',                       
            },                      
            function getMultipleRequests(requestIds) {
              FB.api('', {"ids": requestIds }, function(response) {
                console.log(response);
              });
            }                   
            );
        }

any solution on this?

million thanks for help

  • 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-27T00:41:27+00:00Added an answer on May 27, 2026 at 12:41 am

    Have you enable request 2.0 efficient?

    If you have enabled, you can get the user id easily as the response like this

    {
        request: ‘request_id’
        to:[array of user_ids]
    }
    

    In your callback function, you can use

    response.request to get the request ID

    response.to to get the array of user ids

    And notice that if you use request 2.0, the request ID format will like this

    <request_object_id>_<user_id>
    

    If you doesn’t enable it, then you can only get the array of request ids and you need to make another api call to get the user id

    Edited:

    FB.ui({
            method : "apprequests",
            title : "your title",
            message : "your msg"
          },
          function(response)  {
              var receiverIDs;
              if (response.request)  {
                  var receiverIDs = response.to;  // receiverIDs is an array holding all user ids
              }
          }
    );
    

    Then you can use the array “receiverIDs” for further process

    For example I sent a request to user id with id “1234”, “5678”

    The response will like this:

    {
        request: ‘1234567890’   // example,
        to:['1234', '5678'] 
    }
    

    In request 2.0, the full request id will look like this

    1234567890_1234
    1234567890_5678
    

    Caution: FB doc tell you to manage and delete the request yourself, if you using request 2.0,
    remember to delete the id like the above, if you directly delete the request ‘123456789’, all the full request ID with this prefix will be deleted.

    ==================================================================

    If you haven’t enable request 2.0, follow the code on the doc page to see how to get the user id by making a api call

    function getMultipleRequests(requestIds) {
      FB.api('', {"ids": requestIds }, function(response) {
        console.log(response);
      });
    }
    

    The response format for these methods is as follows:

    {
       "id": "[request_id]",
       "application": {
          "name": "[Application Name]",
          "id": "[Application ID]"
       },
       "to": {
          "name": "[Recipient User Name]",
          "id": "[Recipient User ID]"
       },
       "from": {
          "name": "[Sender User ID]",
          "id": "[Sender User Name]"
       },
       "message": "[Request Message]",
       "created_time": "2011-09-12T23:08:47+0000"
    }
    

    you can implement the callback of api call and getting who is the receiver by response.to.id

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

Sidebar

Related Questions

I have already get how to insert in the database. My only problem is
I want to get the progress of my AJAX request - how much has
I want to get the headers only from a curl request curl -I www.google.com
I want to get only the headers of an URL request. I have been
Hello, I want to get the username from session after the user logged in
I'm not sure if the topic describes my problem very well but I am
I am making restful requests in my silverlight app, I want to get information
I want get the time used for a case so I can create an
I want get all of the Geom objects that are related to a certain
I want to get started doing some game development using Microsoft's XNA. Part of

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.