user3327148
user3327148

Reputation: 1

Unity3d Facebook AppRequest filter

In my Unity project for IOS i use FB.AppRequest(
message: "somedesc",
title: "sometitle",
callback:appRequestCallback );
I want filter and show only friends who don't install app, but filters = ["app_users"] and excludeIds = "someIdValue" not working

How solved this problem

(I use Facebook Unity SDK, https://developers.facebook.com/docs/unity)

Upvotes: 0

Views: 1340

Answers (2)

You can use this:

// "app_non_users" will list friends that haven't installed the game yet
List<object> filter = new List<object>() { "app_non_users" };
// Then, call the API with this filter. Enjoy!
FB.AppRequest("Test Message", null, filter, null, 0, string.Empty, string.Empty, this.HandleResult);

In the examples that are provided within the Facebook SDK for Unity, there's a scene called AppRequests. From there, I've seen a class named AppRequests.cs, in which you can find several examples on how to use these app requests. Note: To try this examples, make sure to add all FacebookSDK provided scenes to your build settings scenes. Test them in device.

Upvotes: 1

Max Yankov
Max Yankov

Reputation: 13277

FB Unity SDK documentation says that filters are currently supported:

Filter are currently not supported for mobile devices

You should probably get list of friends first with a request like this with FB.API method:

FB.API ("/me/friends?installed=false", HttpMethod.GET, Callback, null);

Upvotes: 0

Related Questions