added a function to log sharing acitivity