public override void AppRequest(
     string message,
     OGActionType actionType,
     string objectId,
     string[] to = null,
     string filters = "",
     string[] excludeIds = null,
     int? maxRecipients = null,
     string data = "",
     string title = "",
     FacebookDelegate callback = null)
 {
     fb.AppRequest(message, actionType, objectId, to, filters, excludeIds, maxRecipients, data, title, callback);
 }
 public override void AppRequest(
     string message,
     OGActionType actionType,
     string objectId,
     string[] to = null,
     List<object> filters = null,
     string[] excludeIds = null,
     int? maxRecipients = null,
     string data = "",
     string title = "",
     FacebookDelegate callback = null)
 {
     FBDebug.Info("App Request dialog is not implemented in the Unity editor.");
 }
Example #3
0
        public override void AppRequest(
                string message,
                OGActionType actionType,
                string objectId,
                string[] to = null,
                List<object> filters = null,
                string[] excludeIds = null,
                int? maxRecipients = null,
                string data = "",
                string title = "",
                FacebookDelegate callback = null)
        {
            if (string.IsNullOrEmpty(message))
            {
                throw new ArgumentNullException("message", "message cannot be null or empty!");
            }

            if (actionType != null && string.IsNullOrEmpty(objectId))
            {
                throw new ArgumentNullException("objectId", "You cannot provide an actionType without an objectId");
            }

            if (actionType == null && !string.IsNullOrEmpty(objectId))
            {
                throw new ArgumentNullException("actionType", "You cannot provide an objectId without an actionType");
            }

            var paramsDict = new Dictionary<string, object>();
            paramsDict["message"] = message;
            if (to != null)
            {
                paramsDict["to"] = string.Join(",", to);
            }
            if (actionType != null && !string.IsNullOrEmpty(objectId))
            {
                paramsDict["action_type"] = actionType.ToString();
                paramsDict["object_id"] = objectId;
            }
            if (filters != null)
            {
                paramsDict["filters"] = filters;
            }
            if (excludeIds != null)
            {
                paramsDict["exclude_ids"] = excludeIds;
            }
            if (maxRecipients.HasValue)
            {
                paramsDict["max_recipients"] = maxRecipients.Value;
            }
            if (!string.IsNullOrEmpty(data))
            {
                paramsDict["data"] = data;
            }
            if (!string.IsNullOrEmpty(title))
            {
                paramsDict["title"] = title;
            }

            UI(MethodAppRequests, paramsDict, callback);
        }
        public override void AppRequest(
            string message,
            OGActionType actionType,
            string objectId,
            string[] to = null,
            string filters = "",
            string[] excludeIds = null,
            int? maxRecipients = null,
            string data = "",
            string title = "",
            FacebookDelegate callback = null)
        {
            if (string.IsNullOrEmpty(message))
            {
                throw new ArgumentNullException("message", "message cannot be null or empty!");
            }

            if (actionType != null && string.IsNullOrEmpty(objectId))
            {
                throw new ArgumentNullException("objectId", "You cannot provide an actionType without an objectId");
            }

            if (actionType == null && !string.IsNullOrEmpty(objectId))
            {
                throw new ArgumentNullException("actionType", "You cannot provide an objectId without an actionType");
            }

            var paramsDict = new Dictionary<string, object>();
            // Marshal all the above into the thing

            paramsDict["message"] = message;

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

            if (actionType != null && !string.IsNullOrEmpty(objectId))
            {
                paramsDict["action_type"] = actionType.ToString();
                paramsDict["object_id"] = objectId;
            }

            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));
        }
Example #5
0
 public static void AppRequest(
     string message,
     OGActionType actionType,
     string objectId,
     List<object> filters = null,
     string[] excludeIds = null,
     int? maxRecipients = null,
     string data = "",
     string title = "",
     FacebookDelegate callback = null)
 {
     FacebookImpl.AppRequest(message, actionType, objectId, null, filters, excludeIds, maxRecipients, data, title, callback);
 }
Example #6
0
 public static void AppRequest(
     string message,
     OGActionType actionType,
     string objectId,
     string[] to,
     string data = "",
     string title = "",
     FacebookDelegate callback = null)
 {
     FacebookImpl.AppRequest(message, actionType, objectId, to, null, null, null, data, title, callback);
 }
        public override void AppRequest(
            string message,
            OGActionType actionType,
            string objectId,
            string[] to = null,
            List<object> filters = null,
            string[] excludeIds = null,
            int? maxRecipients = null,
            string data = "",
            string title = "",
            FacebookDelegate callback = null)
        {
            if (string.IsNullOrEmpty(message))
            {
                throw new ArgumentNullException("message", "message cannot be null or empty!");
            }

            if (actionType != null && string.IsNullOrEmpty(objectId))
            {
                throw new ArgumentNullException("objectId", "You cannot provide an actionType without an objectId");
            }

            if (actionType == null && !string.IsNullOrEmpty(objectId))
            {
                throw new ArgumentNullException("actionType", "You cannot provide an objectId without an actionType");
            }

            string mobileFilter = null;
            if(filters != null && filters.Count > 0) {
                mobileFilter = filters[0] as string;
            }

            iosAppRequest(
                Convert.ToInt32(AddFacebookDelegate(callback)),
                message,
                (actionType != null) ? actionType.ToString() : null,
                objectId,
                to,
                to != null ? to.Length : 0,
                mobileFilter != null ? mobileFilter : "",
                excludeIds,
                excludeIds != null ? excludeIds.Length : 0,
                maxRecipients.HasValue,
                maxRecipients.HasValue ? maxRecipients.Value : 0,
                data,
                title);
        }
 public override void AppRequest(string message, OGActionType actionType, string objectId, string[] to, string filters, string[] excludeIds, int? maxRecipients, string data, string title, FacebookDelegate callback)
 {
     Debug.LogError("AppEventsLogPurchase not implemented on WP8");
 }
 public abstract void AppRequest(
     string message,
     OGActionType actionType,
     string objectId,
     string[] to = null,
     List<object> filters = null,
     string[] excludeIds = null,
     int? maxRecipients = null,
     string data = "",
     string title = "",
     FacebookDelegate callback = null);