PHPackages                             xsanisty/loginradius - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. xsanisty/loginradius

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

xsanisty/loginradius
====================

Login Radius PHP-SDK

1.0.0(12y ago)067MITPHPPHP &gt;= 5.3.0

Since Oct 19Pushed 12y ago1 watchersCompare

[ Source](https://github.com/ikhsan017/LoginRadius-SDK)[ Packagist](https://packagist.org/packages/xsanisty/loginradius)[ RSS](/packages/xsanisty-loginradius/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

LoginRadius PHP SDK
===================

[](#loginradius-php-sdk)

This is the composer friendly fork of

LoginRadius PHP SDK is a development kit that lets you integrate Social Login such as Facebook, Google, Twitter and over 20 more on a PHP website. The SDK also fetches user profile data and can be customized from your LoginRadius user account. Ex: social icon sets, login interface, provider settings, etc.

Installation
------------

[](#installation)

Just add "xsanisty/loginradius" : "dev-master" to "require" field in composer.json

**Example Code**

```
"require" : {
    "xsanisty/loginradius" : "dev-master"
}

```

Steps to call the library:

```
 1. On the code behind of callback page, create an object of LoginRadius class and pass secret key and the token.
 2. If success, call getData method to get user's profile data.
   [For Premium paid plans: You can call getData method to get Extended user profile data.]
   visit the link for more information to get list of data: https://www.loginradius.com/product/user-profile-data

```

**Sample code for authentication and get basic profile data**

**PHP**

```
session_start();
require_once __DIR__.'/../vendor/autoload.php';
use LoginRadius\LoginRadius;

$secret = 'your-login-radius-secret';

//save token in session
if(isset($_POST['token'])){
    $_SESSION['token'] = $_POST['token'];
}else{
    $_SESSION['token'] = isset($_SESSION['token']) ? $_SESSION['token'] : '';
}

$token = $_SESSION['token'];

$loginRadius = new LoginRadius($secret, $token);
$userData = $loginRadius->getData();

```

Advance features (for Paid customers only)
==========================================

[](#advance-features-for-paid-customers-only)

> LoginRadius generate a unique session token, when user logs in with any of social network. The lifetime of LoginRadius token is 15 mins, get/Save this Token to call this API.

LoginRadius Contacts API
------------------------

[](#loginradius-contacts-api)

You can use this API to fetch contacts from users social networks/email clients - Facebook, Twitter, LinkedIn, Google, Yahoo.

**PHP**

```
$loginRadius->contact->getContacts();

```

LoginRadius Status API
----------------------

[](#loginradius-status-api)

**PHP**

```
//post status
$response = $loginRadius->status->postStatus(array(
	'to' => '',
	'title' => '',
	'url' => '',
	'imageurl' => '',
	'status' => '',
	'caption' => '',
	'description' => ''
));

if($response === true){
	echo 'Message posted successfully.'; }
elseif(isset($response->errormessage)){
	echo $response->errormessage;
}else{
	echo 'Error in message post.';
}

//get status
$status = $loginRadius->status->getStatus();

```

LoginRadius Posts API
---------------------

[](#loginradius-posts-api)

You can use this API to get posts from users social networks - Facebook, Twitter, LinkedIn

**PHP**

```
//get posts
$posts = $loginRadius->post->getPosts();

```

Get Twitter Mentions
--------------------

[](#get-twitter-mentions)

You can use this API to get mentions from users social network - Twitter.

**PHP**

```
$mentions = $loginRadius->status->getMentions();

```

Facebook Groups
---------------

[](#facebook-groups)

You can use this API to get groups from users social network - Facebook.

**PHP**

```
$groups = $loginRadius->group->getGroups();

```

Get LinkedIn follow companies
-----------------------------

[](#get-linkedin-follow-companies)

You can use this API to get followed companies list from users social network - LinkedIn.

**PHP**

```
$companies = $loginRadius->company->getCompany();

```

LoginRadius direct message API
------------------------------

[](#loginradius-direct-message-api)

You can use this API to send direct message.

**PHP**

```
$response = $loginRadius->message->sendMessage($to,$subject,$message);
if($response === true){
		echo 'Message sent successfully.';
}elseif(isset($response->errormessage)){
		echo $response->errormessage;
}else{
		echo 'Error in sending message.';
}

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4587d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38407a758e03620c0811456dc2b3a6c4dc43cd0d09d55f4c9b04e983ebab3a14?d=identicon)[xsanisty](/maintainers/xsanisty)

---

Top Contributors

[![ikhsan017](https://avatars.githubusercontent.com/u/1480166?v=4)](https://github.com/ikhsan017 "ikhsan017 (17 commits)")

### Embed Badge

![Health badge](/badges/xsanisty-loginradius/health.svg)

```
[![Health](https://phpackages.com/badges/xsanisty-loginradius/health.svg)](https://phpackages.com/packages/xsanisty-loginradius)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
