Return value on a submit handler
Looking at the linkedin module source code,  there's some ways that can run code on the way back (but only when are logging-in, it seems).

When they are logging-in:


hook_linkedin_external_login: if they don't already have an account and will be asked to register.
hook_linkedin_tie_external_login: if they already have an account and will be logged-in using that account.


When they are associating a linkedin account:


I do not see any hooks or any stable way of running code in this case.


Here's an example on how to hook into hook_linkedin_external_login:

In your mymodule.module file:

function mymodule_linkedin_external_login($uid) {
  // do something
}


But you'll have to be careful since linkedin_auth_linkedin_external_login does a drupal_goto() so you'll have to have your module hook called first, so that your function doesn't get skipped. See how drupal decide execution order of same hook in different modules?