Skip to content

Commit

Permalink
Add custom Insights logging for Share Sheet launch, cancel, and post
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gregschechter committed Sep 25, 2012
1 parent 69a8dfd commit e133058
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FBNativeDialogs.m
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down

0 comments on commit e133058

Please sign in to comment.