Just noticed that you posted in C++, i currently work on setting this up myself, but with blueprints.
For blueprint I plan to use a combination of this example (taken from the Advanced Social System marketplace pack), maybe it gives you an idea.