Could be that BZ told him but as a general manga rule, he instantly knew after he was revived. Its common practice for an important character, who was once out of the loop, to know everything relevant to the story as soon as they reappear. This sometimes includes a few short panels of informing them, but if such a recap does not occur, one can assume they instantly know for simple plot purposes.
The example above about him not knowing of Nagato's betrayal is one example. There was a few panels covering the issue, but since no panels were used to cover the Uchiha Massacre issue, its implied he instantly knew somehow. That being either through plot or through BZ.