public function callback() {

        $token = required_param('oauth_token', PARAM_RAW);
        $verifier = required_param('oauth_verifier', PARAM_RAW);
        $secret = $this->flickr->get_request_token_secret(['caller' => 'repository_flickr']);

        // Exchange the request token for the access token.
        $accesstoken = $this->flickr->get_access_token($token, $secret, $verifier);

        // Store the access token and the access token secret in the user preferences.
        set_user_preference('repository_flickr_access_token', $accesstoken['oauth_token']);
        set_user_preference('repository_flickr_access_token_secret', $accesstoken['oauth_token_secret']);
    }
public function callback() {

        $token = required_param('oauth_token', PARAM_RAW);
        $verifier = required_param('oauth_verifier', PARAM_RAW);
        $secret = $this->flickr->get_request_token_secret(['caller' => 'repository_flickr']);

        // Exchange the request token for the access token.
        $accesstoken = $this->flickr->get_access_token($token, $secret, $verifier);

        // Store the access token and the access token secret in the user preferences.
        set_user_preference('repository_flickr_access_token', $accesstoken['oauth_token']);
        set_user_preference('repository_flickr_access_token_secret', $accesstoken['oauth_token_secret']);
    }
public function callback ( ) { $ token = required_param ( 'oauth_token' , PARAM_RAW ) ; $ verifier = required_param ( 'oauth_verifier' , PARAM_RAW ) ; $ secret = $ this -> flickr -> get_request_token_secret ( [ 'caller' => 'repository_flickr' ] ) ; // Exchange the request token for the access token. $ accesstoken = $ this -> flickr -> get_access_token ( $ token , $ secret , $ verifier ) ; // Store the access token and the access token secret in the user preferences. set_user_preference ( 'repository_flickr_access_token' , $ accesstoken [ 'oauth_token' ] ) ; set_user_preference ( 'repository_flickr_access_token_secret' , $ accesstoken [ 'oauth_token_secret' ] ) ; }
Handle the oauth authorize callback

This is to exchange the approved request token for an access token.
Handle the oauth authorize callback