Example #1
0
        public override void SetDataProcessingOptions(IEnumerable <string> options, int country, int state)
        {
            var args = new MethodArguments();

            args.AddList <string>("options", options);
            args.AddPrimative <int>("country", country);
            args.AddPrimative <int>("state", state);
            this.CallFB("SetDataProcessingOptions", args.ToJsonString());
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }