Buddy codes are meant for people you actually know. In practice that means a real-life friend who already has an account can read you theirs, and you add them from there — there's no legitimate way to pull a stranger's code.
Also worth remembering: codes are case-sensitive, so type them exactly as given, capitals and all.