The U.S. president's social media broadside and comments to reporters came as the pope prepared to depart for an 11-day trip to Africa.