Twitter has been forced to hand over personal information belonging to a British politician after council leaders launched a court case.