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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:05:10+00:00 2026-05-21T17:05:10+00:00

So I hope someone call help me with this issue as I’m not too

  • 0

So I hope someone call help me with this issue as I’m not too sure if its javascript, or if its facebook.

Here’s my situation. I upgraded to Requests 2.0 on facebook, which no longer gives me the ability to add an exclude_ids field to the form where users will invite their friends to the App. The purpose of this form is not to just invite friends, but to add friends as something in the App.

In short, I have a list of friends that they have already added, and I want to filter that from the master list of their friends so that when they want to use the form, the friends already added do not show up.

Here is my javascript to get the friends:

<script language="Javascript" type="text/javascript">    
var friends_filter = '<?=$myClass->getFiltered());?>';
</script>

Will return something like:

999999999,999999999,999999999,999999999,999999999,999999999,999999999

Which is a list of IDs of the users who they have NOT added that are their friends.

Here is my code for the form:

function addUser() {
    FB.ui(
    {
        method: 'apprequests',
        display: 'dialog',
        title: 'Add friends',
        message: 'Hey, I added you as a user/friend on such-and-such App', 
        data: 'added',
        filters: [{name: 'Non-Added', user_ids: [friends_filter]}],
    },
    function(response) {
        if(response && response.request_ids) {
            showLoading('Adding Relatives');
            var dataString = 'rids='+response.request_ids;
            $.ajax({
                type: "GET",
                url: server_url+"ajax/add_relative.php",
                data: dataString,
                success: function(data){
                    window.location.reload();
                }
            });
        }
    }
    );
}

If you look at the filters: [{name: 'Non-Added', user_ids: [friends_filter]}], line, that is where I include the list of IDS that I only want to see in the selector. The dialog pops up, but then list those ID’s in friends_filter and an error message stating “does not resolve to a valid user ID”

This is where I get confused, if I copy and paste what friends_filter outputs and replace it the friends_filter with the list of IDs, i.e. 999999999,999999999,999999999,999999999, exactly as it appears, it works correctly.

I know this is an exhaustive post and I’m sorry, but I’m at my wits end.

The only thing I could think of is that perhaps my javascript variable friends_filter needs to be converted to some type of some sort?

Any ideas?

  • 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-21T17:05:11+00:00Added an answer on May 21, 2026 at 5:05 pm

    i was try this code and it is work good with me

          FB.ui(
               {
                 method: 'apprequests',
                 filters: ['app_non_users'],
                 message: 'msg here!',
                title: 'title for box'
               },
               function(response) {
                   alert(response.request_ids);//this is return after send invite
               }
             );
    

    just if you want filter result with list of user use

    filters: [{name: 'Invite friends', user_ids: <?php echo json_encode($users_array);?> }],
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope someone can help... This issue has been discussed here and I have
I hope someone here can help me.. I am currently having a small issue
I really hope someone can help me with this. Basically i have an issue
I'm totally stumped with this one and hope someone could help me out here:
I hope someone can help with this issue. I have a popup iframe using
I really hope someone here can help out with this. I'm using Magento 1.6.1.0
Hope someone can help i cant seem to get my head around this, i
Hope someone can help me out with this problem I am having. I just
I hope someone can help me with this, as I'm unable to find the
I hope someone can help here, we're having an incredibly annoying time with Visual

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.