PHP code example of and / oauth

1. Go to this page and download the library: Download and/oauth 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/ */

    

and / oauth example snippets

 php
// $service is an istance of \OAuth\Common\Service\ServiceInterface (eg. the "Facebook" service)
// with a valid access token
$extractor = $service->constructExtractor(); // get the extractor for the given service
echo $extractor->getUniqueId(); // prints out the unique id of the user
echo $extractor->getUsername(); // prints out the username of the user
echo $extractor->getImageUrl(); // prints out the url of the user profile image