def METHOD_NAME(self, name, id_, client_id, secret_key):
    provider, created = SocialApp.objects.get_or_create(
        name=name.lower(),
        client_id=client_id,
        secret=secret_key,
        provider=id_
    )
    if created:
        # associate with the first site
        provider.sites.add(Site.objects.get_current())
        provider.save()
    else:
        self.stdout.write(
            f"Provider {name} already exists, skipping...")