Facebook activities implying that users interacted with their Facebook friends in real life (like posting and tagging friends in photos) were also associated with lower mortality, while more passive, online-only interactions (like sending messages or liking posts) had no effect. Similarly, receiving a lot of friend requests was associated with living longer -- but sending out friend requests was not.
Clearly, it's not just Facebook itself that's making people live longer. Meeting new people in real life (who subsequently add you as a Facebook friend) and actively maintaining your friendships (face-to-face and online) is the key here.
The study's methods were approved by several university and state review boards, but it should be noted that at least two of its authors have close ties to Facebook. One worked there as a research intern in 2013, and another is currently employed in its research science department. Unsurprisingly, the study's authors remain adamant that Facebook had no influence over the results.