PHP code example of remotemethod / socialite-teamviewer
1. Go to this page and download the library: Download remotemethod/socialite-teamviewer 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/ */
remotemethod / socialite-teamviewer example snippets
'providers' => [
// Other service providers...
RemoteMethod\Socialite\TeamViewer\TeamViewerProvider::class,
],
namespace App\Http\Controllers;
use Socialite;
class AuthController extends Controller
{
/**
* Redirect the user to the TeamViewer authentication page.
*
* @return Response
*/
public function redirectToProvider()
{
return Socialite::driver('teamviewer')->redirect();
}
/**
* Obtain the user information from TeamViewer.
*
* @return Response
*/
public function handleProviderCallback()
{
$user = Socialite::driver('teamviewer')->user();
// $user->token;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.