Class ProfileLandingPresenter<T extends ProfileLandingView>

    • Constructor Detail

      • ProfileLandingPresenter

        public ProfileLandingPresenter()
        Empty constructor Creates a default params for the API calls
      • ProfileLandingPresenter

        public ProfileLandingPresenter​(ProfileParams params)
        Constructor that accepts a ProfileParams The params will be used for all API calls
        Parameters:
        params - query params for Profile API
    • Method Detail

      • connectToFacebook

        public void connectToFacebook​(java.lang.String facebookToken)
        Method that calls the API to connect the member to a Facebook identity
        Parameters:
        facebookToken - authentication token from Facebook
      • connectToFacebook

        public void connectToFacebook​(java.lang.String facebookToken,
                                      ProfileParams profileParams,
                                      ProfileFields profileFields)
        Method that calls the API to connect the member to a Facebook identity
        Parameters:
        facebookToken - authentication token from Facebook
        profileParams - custom ProfileParams
        profileFields - custom ProfileFields
      • loadProfile

        protected void loadProfile()
        API call to get the member's profile
      • onMetadataDownloadFailure

        protected void onMetadataDownloadFailure​(java.lang.String error)
        Called when getting metadata fails
        Parameters:
        error - error message
      • onMetadataDownloadSuccess

        protected void onMetadataDownloadSuccess​(java.util.List<Metadata> data)
        Called when getting metadata is successful
        Parameters:
        data - list of Metadata
      • onProfileDownloadFailure

        protected void onProfileDownloadFailure​(java.lang.String error)
        Called when getting profile fails
        Parameters:
        error - error message
      • onProfileDownloadSuccess

        protected void onProfileDownloadSuccess​(Profile data)
        Called when getting profile is successful
        Parameters:
        data - Profile
      • onConnectFailure

        protected void onConnectFailure​(java.lang.String error)
        Called when connecting identity fails
        Parameters:
        error - error message
      • logoutFacebook

        protected void logoutFacebook()
        Logs out the user from Facebook
      • onConnectSuccess

        protected void onConnectSuccess()
        Called when connecting identity is successful