Method and terminal for sharing content