PHP code example of mjaschen / oauth2-mtbnews

1. Go to this page and download the library: Download mjaschen/oauth2-mtbnews library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mjaschen / oauth2-mtbnews example snippets


$provider = new MarcusJaschen\OAuth2\Client\Provider\MTBNews(
    [
        'clientId'     => 'abcdefghijkl',
        'clientSecret' => 'mnopqrstuvwxyz',
        'redirectUri'  => 'https://www.example.org/oauth/return',
    ]
);

$provider = new MarcusJaschen\OAuth2\Client\Provider\RennradNews(
    [
        'clientId'     => 'abcdefghijkl',
        'clientSecret' => 'mnopqrstuvwxyz',
        'redirectUri'  => 'https://www.example.org/oauth/return',
    ]
);

$provider = new MarcusJaschen\OAuth2\Client\Provider\EMTBNews(
    [
        'clientId'     => 'abcdefghijkl',
        'clientSecret' => 'mnopqrstuvwxyz',
        'redirectUri'  => 'https://www.example.org/oauth/return',
    ]
);