Resetting the share menu on MacOS Yosemite or El Capitan

[Yeah, this isn’t really me kvetching so much as me providing a solution for something about which I was going to kvetch.]

If options like ‘Email this page” Airdrop or Facebook are missing from the pop-up share menu (i.e., in Safari) — execute the following command on the command line to reset it.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -seed

If stuff still doesn’t show back up, then go to System Preferences->Extensions and check some boxes if necessary.