You get a referral code after having the app installed for about 30 minutes. It's called "Invite Task" and you find it with the other tasks. Simply share your invite code with your friends and as soon as they start completing tasks you'll get about 30% of their coins.
Have fun playing :)