After the social media giant auditioned agencies to manage its ad budget, underscoring its Madison Avenue ties, Spark Foundry won the business.