In Facebook’s case it is Google that towers over it and limits its share price performance. In the case of Walmart it is the dreaded online rival Amazon that threatens the retailer’s dominance.

So, this past Thanksgiving the two brands joined forces for a major communications push around Black Friday – the busiest buying period in the American calendar. For 72 hours a crack team from Facebook’s strategic services group headed south to Walmart’s Bentonville headquarters to oversee a major strategic campaign. Walmart pre-purchased 50 million ads on mobile devices of Facebook members who fit the retailer’s target profile for toys, televisions and other discounted products.

The Facebook team were there to monitor the performance of Walmart’s ads and suggest improvements in real time to ensure maximum impact. Never the easiest people to impress, Walmart’s senior team were apparently won over by the service they received and the results.

There were obvious wins for both brands from the Black Friday campaign. Walmart has struggled in the past to drive consideration, especially for electrical items, despite a very large proportion of store space being assigned to these goods. The Facebook campaign provided access to millions of targeted consumers who would usually be more likely to head to Amazon rather than Walmart for their purchases on the busiest day of the year. Sales were apparently up this year on 2011 levels for the Thanksgiving weekend and the retailer added an additional 164,000 Facebook fans in the 72-hour period too.

For Facebook the partnership has even more important implications for 2013 and beyond. After numerous efforts to pitch its new and improved services and underpin its place as a key advertising medium, the company has potentially uncovered a way to attract big advertiser investment – behave like a B2B consulting firm rather than a one-stop media channel.

“Don’t walk in with a PowerPoint presentation talking about Facebook products,” was the advice Carolyn Everson, Facebook’s vice-president of global marketing, gave her troops, “go in and ask questions”. It’s a strategy that seems to be working. Everson’s group now counts more than 1,500 brands as clients and notable successes with big spenders like Samsung, which has pledged to spend 30 per cent of its 2013 budget on Facebook as a result.

Facebook has uncovered a way to attract big advertiser investment – behave like a B2B consulting firm rather than a one-stop media channel

But this doesn’t come without some tensions. Firstly, if Facebook continues to offer upfront pre-purchasing deals to big brands like Walmart the reaction from competing clients could hurt the social media brand as much as help it.

For digital agencies there is also the notable lack of role for them to play as Facebook removes the need for anyone else in the client/medium relationship. Where was the social media agency in all this? It seems Facebook is intent on going direct and clients appear to prefer the directness.

And finally, we should not forget the golden goose, or rather the 900 million golden geese, who give Facebook its clout – the members. Facebook apparently received plenty of complaints from irate users who were bombarded with ads for Walmart despite never liking the massive retailer directly. But balance that with the “incredible levels” of engagement that the campaign created and it’s clear that the membership can take a fair dose of good old fashioned targeted advertising like the rest of us.

The idea that Facebook would eventually, very logically, work its way out of the strategic hole of 2012 makes sense if you listen to Mark Zuckerberg. That’s what a class of Stanford University students were able to do last week when the founder made a surprise guest lecture to a class on campus. Tellingly, it was a programming and not a business class that Zuckerberg dropped into and his message was as logical as it was determined.

Zuckerberg emphasized that engineering thinking isn’t just about how to develop code in the first place but is also relevant to the broader issue of how to “program an organisation”.

“The lesson is not, ‘Don’t make mistakes’, but simply focus on building something awesome,” added Zuckerberg. “It might be expensive and painful to fix the mistakes but if you’re building something that people inherently want and that you think is awesome and have a passion for, then just power through it.”

So perhaps there is marketing hope for Facebook after all. Not just in its successful recent partnerships with Walmart and Samsung but in the more fundamental observation that this company is not afraid to fail and to learn from its mistakes in order to eventually succeed.

In the spirit of the season let us wish Facebook, and one and all engaged in the business of marketing a very merry Christmas and a joyous (and strategically sound) New Year.