Nintendo says that an update to the Switch at some point down the line will let you add friends via social networks.
It was with great dismay that we discovered the Nintendo Switch would utilize "Friend Codes" - 16 digit randomized codes that gamers have to input in order to add their friends. The codes are an archaic holdover from Nintendo's first foray into online gaming, but the "good" news is that we won't have to deal with them for too long. Nintendo has promised additional ways to add friends, including via social networks such as Facebook, will be added to the console in a post-launch update.
Here's the full statement (via Polygon):
Several methods can be used to add friends as quickly and easily as possible: By linking Nintendo Switch to your Nintendo Account, your friends from Miitomo and Super Mario Run will appear as friend candidates so you can easily send them a friend request. Also, we are planning it so that friends from social networking services will be listed as candidates, too.
In the future, you will be able to send a friend request to friends associated with your NNID (Wii U/Miiverse) and Nintendo 3DS.
In some games you will be able to use an in-game interface to send friend requests.
You can send friend requests to those who have played with you recently.
You can establish a friend through local wireless communication.
You can also send a friend request by using a friend code.
The representative neglected to state exactly when these new methods of friending will be added. Currently, the only way to add friends is via local wireless, friend codes, and requests with people you have recently played with.