本文整理匯總了Java中com.facebook.internal.AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_OPENGRAPH屬性的典型用法代碼示例。如果您正苦於以下問題:Java AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_OPENGRAPH屬性的具體用法?Java AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_OPENGRAPH怎麽用?Java AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_OPENGRAPH使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.facebook.internal.AnalyticsEvents
的用法示例。
在下文中一共展示了AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_OPENGRAPH屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: logDialogShare
private void logDialogShare(Context context, ShareContent content, Mode mode) {
String displayType;
if (isAutomaticMode) {
mode = Mode.AUTOMATIC;
}
switch (mode) {
case AUTOMATIC:
displayType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_SHOW_AUTOMATIC;
break;
case WEB:
displayType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_SHOW_WEB;
break;
case NATIVE:
displayType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_SHOW_NATIVE;
break;
default:
displayType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_SHOW_UNKNOWN;
break;
}
String contentType;
DialogFeature dialogFeature = getFeature(content.getClass());
if (dialogFeature == ShareDialogFeature.SHARE_DIALOG) {
contentType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_STATUS;
} else if (dialogFeature == ShareDialogFeature.PHOTOS) {
contentType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_PHOTO;
} else if (dialogFeature == ShareDialogFeature.VIDEO) {
contentType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_VIDEO;
} else if (dialogFeature == OpenGraphActionDialogFeature.OG_ACTION_DIALOG) {
contentType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_OPENGRAPH;
} else {
contentType = AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_UNKNOWN;
}
AppEventsLogger logger = AppEventsLogger.newLogger(context);
Bundle parameters = new Bundle();
parameters.putString(
AnalyticsEvents.PARAMETER_SHARE_DIALOG_SHOW,
displayType
);
parameters.putString(
AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_TYPE,
contentType
);
logger.logSdkEvent(AnalyticsEvents.EVENT_SHARE_DIALOG_SHOW, null, parameters);
}