To get unlimited hearts and gems in the game, you need to download and install the modded version of the game from a trusted website. Once you have the modded version installed, you can use the hearts and gems to purchase diamonds and enjoy the premium content without spending any money.