Add share app functions

Add share app functions and write api functions