Let $G$ and $E$ be 0-truncated group objects in the infinity category of stacks on a Grothendieck site. Suppose $E$ is commutative. Then it turns out that the classifying stack $BE$ of $E$-torsors comes with a commutative group structure making it a commutative group stack. I have heard that the following claim before :
Group homomorphisms $f : G \to BE$ are equivalent to central extensions $0 \to E \to \tilde{G} \to G \to 1$
Given $f$, it follows from the definition of $BE$ that by pulling back the identity $* \to BE$ one obtains an $E$-torsor $\tilde{G} \to G$ with fiber above identity being $E$. By using the multiplication of $BE$, I can construct a multiplication on $\tilde{G}$ and show that the inclusion of the fiber $E \to \tilde{G}$ is a group homomorphism. However I am stuck at showing $E$ lies in the center of $\tilde{G}$. Any hints?