Longroad plans to have the farm up and running next year, and it's expected to have a capacity of 379 megawatts, which would be enough to power almost 300,000 homes. At 4,600 acres, it'll be one of the nation's largest solar farms.

It's the first time Facebook has invested directly in a renewable energy project. It's not clear exactly how much of the $416 million financing package Facebook covered, but it said it's contributing a "significant" portion of the total costs. The company is the sole tax equity investor for the project. The farm will sell some of its output to Shell, which plans to resell the energy. Facebook and Shell will also receive renewable energy tax credits.

"Facebook is excited to be one of the first companies to use a direct investment to meet our renewable energy goals," Facebook's energy strategy manager Peter Freed said in a statement. "We hope such investments can be a new avenue of meaningfully engaging with projects, which might be easier for some companies than a long-term power purchase agreement, thereby unlocking new options for more organizations to meet their goals and grow the market."

As of last year, 75 percent of Facebook's business runs on renewable energy. Other tech major companies already run on renewable energy or plan to do so. Apple and Google are using carbon offsets and credits to cancel out their fossil fuel use, though both plan to fully run on renewable energy eventually. Many of Apple's suppliers use clean energy too.