From e133058d3e8fafcdccdcbccf4acf7401e891c9fd Mon Sep 17 00:00:00 2001 From: Greg Schechter Date: Tue, 25 Sep 2012 10:01:31 -0700 Subject: [PATCH] Add custom Insights logging for Share Sheet launch, cancel, and post Summary: Now that FBNativeDialogs is in, extend the Custom Insights logging introduced earlier tonight to Share Sheet operations. Test Plan: Tested by invoking the share sheet and watching things go. Hit what I think Jason described as a bug with loginType that's causing the share sheet display to fail, but worked around it for the testing. Reviewers: jacl, clang Reviewed By: jacl CC: msdkexp@ Differential Revision: https://phabricator.fb.com/D583401 --- src/FBNativeDialogs.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FBNativeDialogs.m b/src/FBNativeDialogs.m index 439d4b7a56..c2a29daad3 100644 --- a/src/FBNativeDialogs.m +++ b/src/FBNativeDialogs.m @@ -87,7 +87,7 @@ + (BOOL)presentShareDialogModallyFrom:(UIViewController*)viewController [composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) { BOOL cancelled = (result == SLComposeViewControllerResultCancelled); - NSString *eventToLog = cancelled ? @"_shareSheetCancel" : @"_shareSheetPost"; + NSString *eventToLog = cancelled ? @"_shareDialogCancel" : @"_shareDialogPost"; [FBUtility logInsightsEvent:eventToLog session:session]; if (handler) { handler(cancelled ? FBNativeDialogResultCancelled : FBNativeDialogResultSucceeded, nil); @@ -96,7 +96,7 @@ + (BOOL)presentShareDialogModallyFrom:(UIViewController*)viewController [viewController presentModalViewController:composeViewController animated:YES]; - [FBUtility logInsightsEvent:@"_shareSheetLaunch" session:session]; + [FBUtility logInsightsEvent:@"_shareDialogLaunch" session:session]; return YES; }