Sponsorship

Programs, chat rooms, quests, and other resources inside LiveLike can have sponsor information attached to them.

Sponsor object

Each sponsor has a unique identifier that will be the same everywhere the sponsor is used.

  • Name is the name of the sponsor, helpful for labeling and organization.
  • Image should be some kind of creative asset, like a logo or a banner.
  • Brand color helps theme features using the sponsor's brand color.

Creating a sponsor

  1. Head to your Application on the Producer Site
  2. Select "Sponsors" in the Sidebar
  3. Select the "New Sponsor" button on the top right hand side
  4. Enter Sponsor Name, pick a logo image to upload and select the brand color
  5. Select "Create" to finish

At this point you have a sponsor that is ready to be linked to programs, chat rooms,

Linking sponsors with programs

  1. Head to your Application on the Producer Site
  2. Select "Programs" in the Sidebar
  3. Select the program you are working with
  4. Press on the vertical triple dots button of a program
  5. Select "Edit Program"
  6. Scroll to the "Linked Sponsors"
  7. Select/Unselect the Sponsor you would like to link (use ctrl select for multiple sponsor selections)
  8. Press "Update" to update Sponsor link changes that have been made to the program

Now you have Sponsors that are linked to a program.

List all sponsors

Get list of all sponsors created in a given application

LiveLike.getApplicationSponsors()
.then((paginatedSponsors) => {
    console.log(paginatedSponsors);
})
sdk.sponsorship.getByApplication(page: .first) { result in
    switch result {
        case .success(let sponsors):
            //Success Block
        case .failure(let error):
            //Failure Block
    }
}
sdk.sponsor().fetchForApplication(LiveLikePagination.FIRST, object : LiveLikeCallback<List<SponsorModel>>() {
    override fun onResponse(result: List<SponsorModel>?, error: String?) {
        
    }
})

Get sponsors for program

Now that you have linked sponsor(s) to a program, you will now be able to retrieve sponsor information through our SDK interfaces.

LiveLike.getProgramSponsors({ programId: "<program id>"})
.then(paginatedSponsors => {
    console.log(paginatedSponsors);
})
class HelloWorld {
  let sdk: EngagementSDK
  
  sdk.sponsorship.getBy(programID: <"progam id">) { result in
     switch result {
     case let .success(let sponsors):
     	//do something with sponsors
     case let .failure(error):
     	print(error)
     }
  }
}
sdk.sponsor().fetchByProgramId(
    <program-id>,
    LiveLikePagination.FIRST,
    object : LiveLikeCallback<List<SponsorModel>>() {
        override fun onResponse(result: List<SponsorModel>?, error: String?) {
            
        }
    }
)
final sponsorsList =await sdk.sponsor.fetchByProgramId(<program-id>)

Get sponsors for chat room

LiveLike.getChatRoomSponsors({ roomId: "room-id" })
.then(paginatedSponsors => {
    console.log(paginatedSponsors);
})
self.sdk.sponsorship.getBy(
    chatRoomID: chatroom.roomID, 
    page: .first, 
    completion: { result in
        switch result {
            case .success(let sponsors):
                //Success Block
            case .failure(let error):
                //Failure Block
        }
    }
)
sdk.sponsor().fetchByChatRoomId(
    <chat-room-id>,
    LiveLikePagination.FIRST,
    object : LiveLikeCallback<List<SponsorModel>>() {
        override fun onResponse(result: List<SponsorModel>?, error: String?) {
            
        }

    })

Displaying sponsors

Sponsor details like name, image URL, and brand color are included in API responses and SDK objects. The integration should customize the UI to display the sponsor as needed.