A Facebook chat has led to the arrest of a man who police said confessed to sexually abusing a child.