Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 515 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 515 Bytes

Loghy PHP SDK

Usage

Installation

$ composer require incudata-loghy/loghy-php

SDK Initialization

<?php
use Loghy\SDK\Loghy;

$loghy = new Loghy('{YOUR_SITE_CODE}');

Get authenticated user from authorization code

<?php

$user = $loghy->user($code);

$loghyId = $user->getLoghyId();
$name    = $user->getName();
$email   = $user->getEmail();

Set the user ID issued by your sites to Loghy ID

$loghy->putUserId('{YOUR_USER_ID}', '{YOUR_LOGHY_ID}');