The Howard and Martha Coray notebook, a journal of sorts, records Joseph Smith (the first prophet of the LDS Church) saying in August of 1843:
There is a thought more dreadful than that of total annihilation That
thought is the an assurance thought that we shall never again meet with those we loved here on earth . . . Well you lose a friend you come up in the resurection hoping to [meet] him again but find yourself separated from them to all eternity . . . this thought I say of being disappointed in meeting my friend in the resurection is to me more dreadful than of ceasing to suffer by cessation of being (The Words of Joseph Smith, Ehat & Cook, compilers, 239-40; original spelling, grammar, and emendations retained)
Salvation is not singular. To be saved but alone would be worse than annihilation. Heaven can only be heaven if it is filled with those we love.
As Richard Bushman has pointed out (Rough Stone Rolling), this emphasis on friendship and human relationship was central to Smith's understanding of human being and so also to his understanding of religion and salvation. And as that understanding developed, so too did the way that he spoke of being with friends and family eternally.
Smith had already preached (August 1839) that those who have come before us in the world, from Adam to the present, could not be made perfect without us (Ehat & Cook 10).
The author of Hebrews teaches that those who came before Christ could not be saved without those who lived as witnesses and beneficiaries of Jesus' life, death, and resurrection (Heb. 11:39-40). The perfection of ancient exemplars of faith came only when faith could be made perfect in Jesus. Though denied the full blessings of their faith while they were alive, they received those blessings when Christ completed his ministry.
Smith's idea was similar, and he used Hebrews 11:40 as a proof text. But Smith took the idea further. The perfection of those who came before included and went beyond the mission of Jesus Christ. He extended Christ's perfecting work to the restoration of the gospel that God worked through Smith: the completion of the work of salvation begun with Adam, continued through the prophets of the Old Testament, and brought to its climax in Jesus' suffering, death, and resurrection was to be finished in the work done through Joseph Smith.
Smith envisioned that work as, among other things, the establishment of a heavenly kingdom on earth from which Christ will rule when he returns (D&C 29:11). But the kingdom that Smith envisioned was more than just the millennial kingdom. It was also the eternal kingdom of God. Friendship and family is essential before the Second Coming. It is at least, if not more, essential afterward. It is even more essential in the eternities.
Smith spoke of the necessity of friendship in the heavenly kingdoms in 1843, but by 1840 he had already taught the doctrine of baptism for the dead, which he explains this way in 1842:
[Referring to Malachi 4:5-6], the earth will be smitten with a curse unless there is a welding link of some kind or other between the fathers and the children, upon some subject or other—and behold what is that subject? It is the baptism for the dead. For we without them cannot be made perfect; neither can they without us be made perfect. Neither can they nor we be made perfect without those who have died in the gospel also; for it is necessary in the ushering in of the dispensation of the fulness of times, which dispensation is now beginning to usher in, that a whole and complete and perfect union, and welding together of dispensations, and keys, and powers, and glories should take place, and be revealed from the days of Adam even to the present time. (D&C 128:18)
Heaven is not heaven unless those who reside there are linked, welded together, as fathers and mothers and children and friends. And that linking is to extend through all human time. As Terryl Givens points out, for Smith salvation means not only reconciliation with God, but reconciliation with all those whom we love, ultimately with the whole human family.