Added shareWidget parameter to constructor.