Log() public static method

public static Log ( string msg ) : void
msg string
return void
 internal static void handlePurchaseCompleted(System.Object data)
 {
     try {
         if (!FB.Mobile.IsImplicitPurchaseLoggingEnabled())
         {
             return;
         }
         object metadata          = CodelessIAPAutoLog.GetProperty(data, "metadata");
         object productDefinition = CodelessIAPAutoLog.GetProperty(data, "definition");
         if (metadata == null || productDefinition == null)
         {
             return;
         }
         Decimal price    = (Decimal)CodelessIAPAutoLog.GetProperty(metadata, "localizedPrice");
         String  currency = (String)CodelessIAPAutoLog.GetProperty(metadata, "isoCurrencyCode");
         String  id       = (String)CodelessIAPAutoLog.GetProperty(productDefinition, "id");
         FB.LogAppEvent(
             AppEventName.Purchased,
             (float)price,
             new Dictionary <string, object>()
         {
             { "_implicitlyLogged", "1" },
             { AppEventParameterName.Currency, currency },
             { AppEventParameterName.ContentID, id }
         });
     }
     catch (System.Exception e)
     {
         FacebookLogger.Log("Failed to automatically handle Purchase Completed: " + e.Message);
     }
 }
示例#2
0
        public void OnFacebookResponse(IInternalResult result)
        {
            FacebookLogger.Log(result.ToString());
            if (result == null || result.CallbackId == null)
            {
                return;
            }

            object callback;

            if (facebookDelegates.TryGetValue(result.CallbackId, out callback))
            {
                CallCallback(callback, result);
                facebookDelegates.Remove(result.CallbackId);
            }
        }
示例#3
0
 public static void Log(string format, params string[] args)
 {
     FacebookLogger.Log(string.Format(format, args));
 }