My problem is I don’t want to display user specific activities. it should list all the activities regardless of which page you are on. However I have found the solution. On members profile page it takes scope=only-me parameter by default which forces to load activities from current logged in user. Below is the completed plugin for my project which I uploaded to WordPress.
@bphelp hi I tried your plugin unfortunately it didn’t work for me. On members profile page it shows activities only from current user. I need a widget that shows site wide activities all the time regardless of the current action. I studied your code and learned so many things and able to develop my own simple widget for my project.