I wanted to open the uber chest but when I give it to my friend so that I can open the chest. But, where is the place to put the friendcode??

If the account is over level 10, then it’s nowhere. Otherwise, on your kingdom you only have to tap a bug voucher that appears in the top side of the screen.