Facebook.AndroidFacebook.AppRequest C# (CSharp) Method

AppRequest() public method

public AppRequest ( string message, string to = null, string filters = "", string excludeIds = null, int maxRecipients = null, string data = "", string title = "", FacebookDelegate callback = null ) : void
message string
to string
filters string
excludeIds string
maxRecipients int
data string
title string
callback FacebookDelegate
return void
        public override void AppRequest(
            string message,
            string[] to = null,
            string filters = "",
            string[] excludeIds = null,
            int? maxRecipients = null,
            string data = "",
            string title = "",
            FacebookDelegate callback = null)
        {
            Dictionary<string, object> paramsDict = new Dictionary<string, object>();
            // Marshal all the above into the thing

            paramsDict["message"] = message;

            if (callback != null)
            {
                paramsDict["callback_id"] = AddFacebookDelegate(callback);
            }

            if (to != null)
            {
                paramsDict["to"] = string.Join(",", to);
            }

            if (!string.IsNullOrEmpty(filters))
            {
                paramsDict["filters"] = filters;
            }

            if (maxRecipients != null)
            {
                paramsDict["max_recipients"] = maxRecipients.Value;
            }

            if (!string.IsNullOrEmpty(data))
            {
                paramsDict["data"] = data;
            }

            if (!string.IsNullOrEmpty(title))
            {
                paramsDict["title"] = title;
            }

            CallFB("AppRequest", MiniJSON.Json.Serialize(paramsDict));
        }