dusanmiha

Facebook App - Ecommerce - Android - Java - AddedToWishList Event

Oct 14th, 2021
555
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * This function assumes logger is an instance of AppEventsLogger and has been
  3.  * created using AppEventsLogger.newLogger() call.
  4.  */
  5. public void logAddedToWishlistEvent (String contentId, String contentType, String currency, double price) {
  6.     Bundle params = new Bundle();
  7.     params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, contentId);                 //product identifier. String.
  8.     params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, contentType);             //'product' or 'product_group'. String.
  9.     params.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, currency);                    //ISO 4217 code, e.g., "EUR", "RSD"..string.
  10.     logger.logEvent(AppEventsConstants.EVENT_NAME_ADDED_TO_WISHLIST, price, params);
  11. }
RAW Paste Data