public override void AppRequest( string message, OGActionType?actionType, string objectId, IEnumerable <string> to, IEnumerable <object> filters, IEnumerable <string> excludeIds, int?maxRecipients, string data, string title, FacebookDelegate <IAppRequestResult> callback) { this.ValidateAppRequestArgs( message, actionType, objectId, to, filters, excludeIds, maxRecipients, data, title, callback); MethodArguments args = new MethodArguments(); args.AddString("message", message); args.AddNullablePrimitive("action_type", actionType); args.AddString("object_id", objectId); args.AddCommaSeparatedList("to", to); if (filters != null && filters.Any()) { string mobileFilter = filters.First() as string; if (mobileFilter != null) { args.AddString("filters", mobileFilter); } } args.AddNullablePrimitive("max_recipients", maxRecipients); args.AddString("data", data); args.AddString("title", title); var appRequestCall = new JavaMethodCall <IAppRequestResult>(this, "AppRequest"); appRequestCall.Callback = callback; appRequestCall.Call(args); }
public override void AppRequest(string message, OGActionType?actionType, string objectId, IEnumerable <string> to, IEnumerable <object> filters, IEnumerable <string> excludeIds, int?maxRecipients, string data, string title, FacebookDelegate <IAppRequestResult> callback) { base.ValidateAppRequestArgs(message, actionType, objectId, to, filters, excludeIds, maxRecipients, data, title, callback); MethodArguments methodArguments = new MethodArguments(); methodArguments.AddString("message", message); methodArguments.AddCommaSeparatedList("to", to); methodArguments.AddString("action_type", (!actionType.HasValue) ? null : actionType.ToString()); methodArguments.AddString("object_id", objectId); methodArguments.AddList <object>("filters", filters); methodArguments.AddList <string>("exclude_ids", excludeIds); methodArguments.AddNullablePrimitive <int>("max_recipients", maxRecipients); methodArguments.AddString("data", data); methodArguments.AddString("title", title); new CanvasFacebook.CanvasUIMethodCall <IAppRequestResult>(this, "apprequests", "OnAppRequestsComplete") { Callback = callback }.Call(methodArguments); }
public override void AppRequest( string message, OGActionType?actionType, string objectId, IEnumerable <string> to, IEnumerable <object> filters, IEnumerable <string> excludeIds, int?maxRecipients, string data, string title, FacebookDelegate <IAppRequestResult> callback) { this.ValidateAppRequestArgs( message, actionType, objectId, to, filters, excludeIds, maxRecipients, data, title, callback); MethodArguments args = new MethodArguments(); args.AddString("message", message); args.AddCommaSeparatedList("to", to); args.AddString("action_type", actionType != null ? actionType.ToString() : null); args.AddString("object_id", objectId); args.AddList("filters", filters); args.AddList("exclude_ids", excludeIds); args.AddNullablePrimitive("max_recipients", maxRecipients); args.AddString("data", data); args.AddString("title", title); var call = new CanvasUIMethodCall <IAppRequestResult>(this, MethodAppRequests, Constants.OnAppRequestsCompleteMethodName); call.Callback = callback; call.Call(args); }