I have been using getstream.io for showing activities of the following users only but I am also getting the activities of user whom I am not following.
Eg. A follows B only but A also getting activities of user C.
I am using javascript and the PHP library.
Seems a bit odd. Are you sure A is not following C?
You can check who A is following by going into the dashboard, click on your app, and hit "explorer" in the menu.
You can then "view follows" for your feed with the correct name. The dashboard will help you with autocomplete to find the correct feed.