When registering through the link sent by you, the code will be filled in automatically, no additional data/code is required.
If you do not have this field automatically inserted, it will be because you are not registering through your invitation.
Bear in mind that the invitation sent through Social Networks (eg Facebook) must be public and not via private message. If the invitation is not shared correctly, the link may be invalidated.