Twitter headquarters

SAN FRANCISCO — Litigation is rarely the fastest way to resolve a dispute. But sometimes the threat posed by a lawsuit—and the publicity associated with it—can spur action more quickly than other tactics.