Production of positive and negative ions by photodissociation