San Francisco - Last year, the future for Viddy, a video-sharing Facebook app, seemed as sunny as southern California's skies.
Based a block away from Venice Beach, the 30-person start-up impressed prospective investors with skyrocketing user growth figures and won funding from them at a $370m valuation.
The tech press hailed it as the "Instagram for video", potentially ripe for a billion-dollar-plus buyout. Justin Bieber wanted to invest - and the pop star eventually did just that.
But this month, the company fired its chief executive, laid off nearly half of its staff and blamed plummeting user numbers on something it once believed to be its ticket to success: Facebook.
"Everyone has known for years that Facebook can be a huge driver of traffic, but Facebook also frequently changes who gets traffic," said Brian O'Malley, a Viddy director and a partner at venture capital firm Battery Ventures, which is an investor in Viddy. "We certainly didn't anticipate the decline."
Viddy's dramatic reversal of fortune is a common tale among builders of software and services that rode the social network to viral stardom, only to plummet when Facebook made one of its frequent changes in the way third-party apps can communicate with and solicit customers.
Investors and entrepreneurs say that the unpredictable way that Facebook cuts off apps or suppresses their presence has made them increasingly wary of building companies that rely on Facebook. Some believe Facebook could eventually attract regulatory scrutiny because of its ability to make or break companies that rely on its billion-strong base of users.
Douglas Purdy, Facebook's director of developer products, said the company boosts traffic to apps that prove to be popular and takes it away from those that overwhelm people with notifications or are otherwise abusive or unpopular. In the past year and a half, Facebook has cut down spam complaints by 90%, he said.
"We don't want to be in the business of king-making," Purdy said. "In the end, users decide what they care about, and they have control over it. If you're a great developer and you're good at sharing really good content, you're going to get traffic."
He declined to comment on relationships with individual developers.
Developers sympathetic to Facebook say that the company has rightly prioritised its users, who could abandon the network if they feel overwhelmed by solicitations from apps.
"Facebook thinks first and foremost about the user," said Riccardo Zacconi, the chief executive of game maker King.com. "For companies that were relying 100% on virality, there's been a negative impact, but it's been a better user experience."
Viral growth occurs when current users recruit other users, by inviting them to join, touting the content or sharing an application.
It is not clear if Viddy and other firms who have partly blamed Facebook for declining fortunes would have run into difficulties eventually anyway as, for example, rivals came out with new products.
But as consumers spend increasing time on mobile devices, disaffected developers could choose to focus on marketing their apps directly to Apple's App Store and Google's Play market - two platforms that compete with Facebook.
"Facebook is in a platform battle that they're losing right now," said Nabeel Hyatt, a partner at Spark Capital, a venture capital firm that has backed rival social media companies like Twitter and Tumblr.
"When we have start-up companies coming in and presenting about where they're going to get users, most of those conversations are about iOS and then Android, and then maybe Facebook."
For hot start-ups, the Facebook platform used to be "the cocktail party you had to be at", Hyatt added. "It's becoming just another cocktail party."
For years, start-ups like Viddy and news apps like The Washington Post Social Reader used automated messages or posts on its users' Facebook pages to lure other users to install its app.
But that put them at the mercy of "EdgeRank", the opaque and closely guarded algorithm that Facebook constantly tweaks to control whether an app's posts are broadly exposed to users.
In financial disclosures, Facebook has warned investors that a fundamental challenge in its business model is finding the balance between the "frequency, prominence and size of ads and other commercial content we display" with its user experience.
While Facebook is under intense pressure from Wall Street to turn its massive audience into growth in advertising revenue, a lot of the changes that rattle firms like Viddy seem to be more related to Facebook's attempts to retain users.
Viddy's implosion has been spectacular - it fell from 35 million monthly users at its peak last year to half a million recently, according to Appdata.com, a tracking service.
But the collapse is not unique. Branchout, a business networking service built on top of Facebook, raised $25m last April from A-list backers including Accel Partners.
But now it languishes with just 100 000 monthly users on Facebook, down from a high of 39 million, after Facebook limited the automatic notifications that Branchout used to attract users.
The poster child for fallen Facebook stars has been Zynga, the game publisher that shot to popularity, and a lucrative IPO, with viral Facebook games like FarmVille that distributed a deluge of notifications about virtual farm animals before Facebook clamped down.
Zynga, whose shares are trading two-thirds below its IPO price, has since announced that it would loosen its ties with Facebook and develop its own network for gamers. Zynga declined to comment for this article.
The fate of Facebook apps have drawn attention to the perennial push-and-pull between large technology companies and smaller developers. Like tech industry heavyweights before it, Facebook recognises it can expand its market power and offer new features by fostering a thriving ecosystem. But those relationships have historically been fraught.
In the 1990s, the Windows operating system rose to dominate personal computing, but its maker Microsoft was accused of favouring its own browser and word processor over its competitors' offerings like Netscape and WordPerfect.
Similarly, Apple's iPhone dominated smartphone sales 15 years later with the help of third-party apps - but it, too, has periodically attracted attention from the Federal Trade Commission over whom and what it lets into its App Store and iTunes platforms. Recently, Twitter has also clashed with some third-party developers.
Facebook first opened its programming interfaces to outside developers in 2007. The company later rolled out log-in credentials for third-party sites and then the powerful "Open Graph" protocol, which gives apps developers access to troves of data.
The company said it expects developers to contribute interesting content - rather than game the system for growth.
"Facebook is a story-telling device," said Purdy, the Facebook executive. "Driving millions and millions of installs is not why we built it."
"There are always going to be players who, for whatever reason, aren't seeing what they want or feel disenfranchised," he added. "But when we look at the totality of the ecosystem, it's never been stronger."
And current and former Facebook employees argue that the company has sought to communicate to its developers that they shouldn't be over-reliant on Facebook.