Rank 1 character varieties of finitely presented groups