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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:20:00+00:00 2026-06-09T15:20:00+00:00

My WP site allows users to send messages to other FB users with the

  • 0

My WP site allows users to send messages to other FB users with the FB.ui() send method:

          FB.ui(
              method: 'send',
              name: 'Bla Bla Bla',
              link: 'http://www.example.com',
              show_error: true,
              display: 'popup'
              },

              function (data) {
                console.log(data);
                if ( data.success=true ) {
                    console.log('SUCCESS');                 
                    jQuery.post('http://www.example.com/wp-admin/admin-ajax.php',               {
                            action : 'my_ajax_function',
                            user_id: '###',
                            postID : MyAjax.postID
                        }, function(returned) { console.log(returned);  }
                    );                  

                } else {
                    console.log('Failed to send FB invite');
                };
             }   
              );

As you can see, I’m making an AJAX call in the callback function. I’d really like that AJAX call to have access to the number of recipients who just received the message. When I log the data passed into the callback function, I don’t see any useful info besides success : true.

Anyone know of a way to retrieve the number of recipients?

  • 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-06-09T15:20:01+00:00Added an answer on June 9, 2026 at 3:20 pm

    When I log the data passed into the callback function, I don’t see any useful info besides success : true

    And that’s only because you are setting the value of data.success yourself – data.success=true is not a comparison, it’s an assignment.

    Anyone know of a way to retrieve the number of recipients?

    There is no direct way of doing that, see https://developers.facebook.com/docs/reference/dialogs/send/:

    “If sending the message is successful, the user will be redirected to the redirect_uri. Otherwise, an error will be shown. Unlike the Like Button, there is no return value per se.”

    You could try to find the message that the user just send via the user/outbox connection after asking for read_mailbox permission – but you’d still have to figure out which message in there is the right one by looking at the created_time and/or message content.

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

Sidebar

Related Questions

I have a simple site which allows users to upload files (among other things
Hello I have a simple form on my site that allows users to send
I'm using the Facebook JS SDK to let my site's users send FB messages
My asp.net site allows users to pick the theme they want from a list
I'm running a site that allows users to make comments, and most of them
I'm creating an site which allows users to upload photos. It's a linux server.
I'm working on a site that allows users to purchase digital content and have
I've got a Django-based site that allows users to register (but requires an admin
The code below works great. It allows a user to send emails to other
One section of my site allows users to upload files. These files are not

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.