Twitter Inc. is banning political advertising, taking the opposite position of rival Facebook Inc. on an issue that is riling campaigns and prompting social-media companies to rethink how to deal with the spread of potentially false and misleading information on their platforms.

...