Ejemplo n.º 1
0
        public override void Init(
            string appId,
            bool cookie,
            bool logging,
            bool status,
            bool xfbml,
            string channelUrl,
            string authResponse,
            bool frictionlessRequests,
            HideUnityDelegate hideUnityDelegate,
            InitDelegate onInitComplete)
        {
            base.Init(
                appId,
                cookie,
                logging,
                status,
                xfbml,
                channelUrl,
                authResponse,
                frictionlessRequests,
                hideUnityDelegate,
                onInitComplete);

            IOSFacebook.IOSInit(
                appId,
                cookie,
                logging,
                status,
                frictionlessRequests,
                FacebookSettings.IosURLSuffix,
                Constants.UnitySDKUserAgentSuffixLegacy);
        }
Ejemplo n.º 2
0
 public override void GameGroupCreate(
     string name,
     string description,
     string privacy,
     FacebookDelegate <IGroupCreateResult> callback)
 {
     IOSFacebook.IOSCreateGameGroup(this.AddCallback(callback), name, description, privacy);
 }
Ejemplo n.º 3
0
        public override void AppEventsLogPurchase(
            float logPurchase,
            string currency,
            Dictionary <string, object> parameters)
        {
            NativeDict dict = MarshallDict(parameters);

            IOSFacebook.IOSFBAppEventsLogPurchase(logPurchase, currency, dict.NumEntries, dict.Keys, dict.Values);
        }
Ejemplo n.º 4
0
 public override void AppEventsLogEvent(string logEvent, float?valueToSum, Dictionary <string, object> parameters)
 {
     IOSFacebook.NativeDict nativeDict = IOSFacebook.MarshallDict(parameters);
     if (valueToSum.HasValue)
     {
         this.iosWrapper.LogAppEvent(logEvent, (double)valueToSum.Value, nativeDict.NumEntries, nativeDict.Keys, nativeDict.Values);
     }
     else
     {
         this.iosWrapper.LogAppEvent(logEvent, 0.0, nativeDict.NumEntries, nativeDict.Keys, nativeDict.Values);
     }
 }
Ejemplo n.º 5
0
 public override void ShareLink(
     Uri contentURL,
     string contentTitle,
     string contentDescription,
     Uri photoURL,
     FacebookDelegate <IShareResult> callback)
 {
     IOSFacebook.IOSShareLink(
         this.AddCallback(callback),
         contentURL.AbsoluteUrlOrEmptyString(),
         contentTitle,
         contentDescription,
         photoURL.AbsoluteUrlOrEmptyString());
 }
Ejemplo n.º 6
0
        public override void AppEventsLogEvent(
            string logEvent,
            float?valueToSum,
            Dictionary <string, object> parameters)
        {
            NativeDict dict = MarshallDict(parameters);

            if (valueToSum.HasValue)
            {
                IOSFacebook.IOSFBAppEventsLogEvent(logEvent, valueToSum.Value, dict.NumEntries, dict.Keys, dict.Values);
            }
            else
            {
                IOSFacebook.IOSFBAppEventsLogEvent(logEvent, 0.0, dict.NumEntries, dict.Keys, dict.Values);
            }
        }
Ejemplo n.º 7
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);

            string mobileFilter = null;

            if (filters != null && filters.Any())
            {
                mobileFilter = filters.First() as string;
            }

            IOSFacebook.IOSAppRequest(
                this.AddCallback(callback),
                message,
                (actionType != null) ? actionType.ToString() : string.Empty,
                objectId != null ? objectId : string.Empty,
                to != null ? to.ToArray() : null,
                to != null ? to.Count() : 0,
                mobileFilter != null ? mobileFilter : string.Empty,
                excludeIds != null ? excludeIds.ToArray() : null,
                excludeIds != null ? excludeIds.Count() : 0,
                maxRecipients.HasValue,
                maxRecipients.HasValue ? maxRecipients.Value : 0,
                data,
                title);
        }
Ejemplo n.º 8
0
        public override void AppInvite(
            Uri appLinkUrl,
            Uri previewImageUrl,
            FacebookDelegate <IAppInviteResult> callback)
        {
            string appLinkUrlStr      = string.Empty;
            string previewImageUrlStr = string.Empty;

            if (appLinkUrl != null && !string.IsNullOrEmpty(appLinkUrl.AbsoluteUri))
            {
                appLinkUrlStr = appLinkUrl.AbsoluteUri;
            }

            if (previewImageUrl != null && !string.IsNullOrEmpty(previewImageUrl.AbsoluteUri))
            {
                previewImageUrlStr = previewImageUrl.AbsoluteUri;
            }

            IOSFacebook.IOSAppInvite(
                this.AddCallback(callback),
                appLinkUrlStr,
                previewImageUrlStr);
        }
Ejemplo n.º 9
0
        public override void Init(
            string appId,
            bool cookie,
            bool logging,
            bool status,
            bool xfbml,
            string channelUrl,
            string authResponse,
            bool frictionlessRequests,
            HideUnityDelegate hideUnityDelegate,
            InitDelegate onInitComplete)
        {
            base.Init(
                appId,
                cookie,
                logging,
                status,
                xfbml,
                channelUrl,
                authResponse,
                frictionlessRequests,
                hideUnityDelegate,
                onInitComplete);

            string unityUserAgentSuffix = string.Format(
                "Unity.{0}",
                Facebook.Unity.FacebookSdkVersion.Build);

            IOSFacebook.IOSInit(
                appId,
                cookie,
                logging,
                status,
                frictionlessRequests,
                FacebookSettings.IosURLSuffix,
                unityUserAgentSuffix);
        }
Ejemplo n.º 10
0
        public override void FeedShare(
            string toId,
            Uri link,
            string linkName,
            string linkCaption,
            string linkDescription,
            Uri picture,
            string mediaSource,
            FacebookDelegate <IShareResult> callback)
        {
            string linkStr = link != null?link.ToString() : string.Empty;

            string pictureStr = picture != null?picture.ToString() : string.Empty;

            IOSFacebook.IOSFeedShare(
                this.AddCallback(callback),
                toId,
                linkStr,
                linkName,
                linkCaption,
                linkDescription,
                pictureStr,
                mediaSource);
        }
Ejemplo n.º 11
0
 protected override void SetShareDialogMode(ShareDialogMode mode)
 {
     IOSFacebook.IOSSetShareDialogMode((int)mode);
 }
Ejemplo n.º 12
0
 public override void GetAppLink(
     FacebookDelegate <IAppLinkResult> callback)
 {
     IOSFacebook.IOSGetAppLink(System.Convert.ToInt32(CallbackManager.AddFacebookDelegate(callback)));
 }
Ejemplo n.º 13
0
 public override void FetchDeferredAppLink(FacebookDelegate <IAppLinkResult> callback)
 {
     IOSFacebook.IOSFetchDeferredAppLink(this.AddCallback(callback));
 }
Ejemplo n.º 14
0
 public override void ActivateApp(string appId)
 {
     IOSFacebook.IOSFBSettingsActivateApp(appId);
 }
Ejemplo n.º 15
0
 public override void GameGroupJoin(
     string id,
     FacebookDelegate <IGroupJoinResult> callback)
 {
     IOSFacebook.IOSJoinGameGroup(System.Convert.ToInt32(CallbackManager.AddFacebookDelegate(callback)), id);
 }
Ejemplo n.º 16
0
 public override void LogOut()
 {
     base.LogOut();
     IOSFacebook.IOSLogOut();
 }
Ejemplo n.º 17
0
 public override void LogInWithPublishPermissions(
     IEnumerable <string> permissions,
     FacebookDelegate <ILoginResult> callback)
 {
     IOSFacebook.IOSLogInWithPublishPermissions(this.AddCallback(callback), permissions.ToCommaSeparateList());
 }
Ejemplo n.º 18
0
 public override void AppEventsLogPurchase(float logPurchase, string currency, Dictionary <string, object> parameters)
 {
     IOSFacebook.NativeDict nativeDict = IOSFacebook.MarshallDict(parameters);
     this.iosWrapper.LogPurchaseAppEvent((double)logPurchase, currency, nativeDict.NumEntries, nativeDict.Keys, nativeDict.Values);
 }