The agreement came after sustained pressure against Facebook by the advertising industry, which has engaged in a months-long boycott of the platform.