Changing light fixture
Likely one of the wire pairs is the switch connection, what your buddy calls the switch leg. probably the one that didnt have ground connected. In this case, on that wire pair, neither black nor white is common.. instead one wire is hot to switch and the other wire is hot return from the switch. Youre supposed to mark the white wire with tape or ink to indicate its not common but often its not marked. You want return from the switch to be hot for the light fixture. Dont patch it to the other whites..its not a common. This matches your buddys instructions so far. You didnt mention if you hooked up common as well as hot on the fixture. That would be a problem if it has only hot no common... The third pair is likely another connection downstream from your fixture on the circuit, so you are leaving somwthing disconnected, maybe an outlet. My guess is that if you didnt identify which pair goes to the switch you may have used the wrong wires intended to extend the circuit downstream but you thought they were the switch leg. So my advice is confirm the switch leg with a meter. The only other guess i have is there are a couple other ways the box might be wired into the house circuit.. but they are hard to explain and seldom used.