Facebook uses a code parameter to authenticate your application. The documentation states:
* If the user clicks Allow, your application is authorized. The OAuth dialog redirects (via HTTP 302) the user's browser to the URL that you passed in the redirect_uri parameter with the authorization code *
To complete authorization, you must now enter the code parameter and your application in a secret state and pass it to the endpoint of the GUI API marker (rephrasing the documentation). This will give you access to the access token. From now on, your application will not request a code parameter for this user, as they have already been authenticated.
Facebook uses signed_request to share information with your application. The documentation indicates three scenarios in which it will transmit a signed request. It:
- The signed_record is sent to the applications on Facebook.com when they are uploaded to Facebook.
- Signed_request is passed to any application that has registered a deauthorized callback in the developer application when this user uninstalls the application using the application panel
- The signed_record is sent to applications that use the registration plugin when the user successfully logs in using his application
Thus, the code parameter is sent only for authentication of the application, and signed_request is used to transmit information after authorization of the application.
source share