Online dating is still not as successful it could be because all data is not used. Everyone has smartphones, partners could be matched up based on the generated sensor data. There's also the low cost gene sequencing services, daters could be matched up using it.
The friendship problem cannot be tackled the same way. Women might be more open to actively seeking new platonic friendships in dating service kind of fashion, but they are less likely to be lonely anyway.
To solve the male loneliness problem would require focusing men around an issue. Men build good friendships over shared forced activities (school, work, military, political meetups, dinners with their wives's friends husbands).
To solve the loney man issue requires more of the same. Greater efficiencies in organizing economic/volunteery groups.
Crowdsourcing and crowdfunding is the answer here. Sites like mechanical turk and kickstarter with better social networking features, and finding ways to physically get people meeting together. For example, a component of kickstarter campaign might require doing a thousand man march in the capital city. Part of a mechanical turk task would require holding a protest. Similar ideas to get people excited about a shared cause meeting up at the same place.
Also, governments should consider creating an army units for elderly or otherwise lonely men. If your old and you're wife/husband died, you should be able to join the army to help in some capacity, even sitting at a desk at the barracks and filling in mechanical turk tasks.