Hi @omat, here's an example about how you can implement your requirements https://github.com/omab/psa-friendsinvite.
The key part is the custom backend at https://github.com/omab/psa-friendsinvite/blob/master/friends/friendsinvite/backend.py, it will check for a GET parameter (
invite) and update the scope in that case, otherwise it will default to usual behavior.
The invite part of the project uses Facebook SDK since Facebook doesn't provide an API to send messages to users.
@omab, there's a tiny issue that makes this example practically not suitable for the production environment.
i've opened a ticket for that:
i'd appreciate if you can have a look. thanks...