When Zynga went public, analysts dinged the social gaming company for its heavy reliance on Facebook. Now that Facebook’s filed to go public, it appears that the same is true of the social media giant.

In its S-1 filing, the company revealed that its partnership with Zynga accounts for 12 percent of its total revenue — a very surprising amount for a single vendor.

And, just as Zynga listed the possibility of its Facebook partnership going south as a risk factor on its paperwork to go public, Facebook listed a similar provision when discussing the Farmville maker Wednesday.

According to the filing: “If the use of Zynga games on our Platform declines, if Zynga launches games on or migrates games to competing platforms, or if we fail to maintain good relations with Zynga, we may lose Zynga as a significant Platform developer and our financial results may be adversely affected.”

Facebook is also working hard on expanding its platform to more developers and will have to keep up good relationships with new partners, such as Spotify and Ticketmaster, to keep it robust.

Zynga, of course, has already been exploring other platforms, including iOS, Google + and its own proprietary platform. But it’s unlikely that this relationship will break up any time soon. Zynga still needs Facebook, but it turns out Facebook needs Zynga just as badly.

And investors have taken note of that relationship. Zynga shares skyrocketed Thursday after the filing, up nearly 15 percent in late morning trading.

(Post Co. Chairman and Chief Executive Donald E. Graham sits on Facebook's board of directors.)

Related stories:

Facebook IPO: Who are Facebook’s shareholders?

Facebook IPO filing: How does the social network feel about China?

Facebook warns investors more federal probes may come

Zynga hits market with $1B IPO