OAuth program code cannot be software. These codes allow you to perform actions on behalf of the user from whom you receive permission.
When redirecting the browser to the URL in step 1, the browser displays a dialog box in which the user clicks Allow or Skip . Only if the user permits and permits your application, are you provided with the OAuth code.
The answer you get at 2 is probably the HTML screen of the screen that you see at 3.
Further; restFB has nothing to do with authentication. This becomes useful after you receive your passkey.
Last but not least, you can take a look at the Desktop Applications documentation.
source share