Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (5) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-01-28 (1 month ago) | Not enough user ratings | Total: 746 This week: 3 | All time: 4,448 This week: 102 |
Version | License | PHP version | Categories | |||
mylogin 1.0.6 | Custom (specified... | 5 | PHP 5, User Management, Social Networ... |
Description | Author | ||||||||||||||
This package can authenticate users using Facebook, Twitter or Google. Recommendations Retrieve Twitter user profile info What is the best PHP facebook login class? PHP Class for Social login What is the best PHP facebook login class? |
|
Abstract Class for Login in Social Networks
Execute phpdoc -d MyLogin/
Create file composer.json
{
"require": {
"php": ">=5.4.0",
"yorch/mylogin" : "dev-master",
"monolog/monolog": "1.13.1",
"facebook/php-sdk-v4" : "4.0.23",
"ruudk/twitter-oauth" : "dev-master",
"google/apiclient": "1.*"
}
}
Execute composer.phar install
$social = MyLogin::getInstance(MyLogin::FACEBOOK, 'APP_ID', 'APP_SECRET', 'CALLBACK_URL');
if ($social->login()){
redirect_to(MYPAGE);
}
else
redirect_to($social->getAuthUrl());
The Library creates session variables:
$_SESSION['SOCIAL_TYPE'] = ('FB', 'TW', 'GP')
$_SESSION['SOCIAL_ID'] = 'SOCIAL_ID'
$_SESSION['SOCIAL_NAME'] = 'SOCIAL_NAME'
$_SESSION['SOCIAL_LNAME'] = 'SOCIAL_LAST_NAME'
$_SESSION['SOCIAL_LINK'] = 'http://SOCIAL_URL/'
$_SESSION['SOCIAL_IMG'] = 'http://SOCIAL_IMG/'
$_SESSION['SOCIAL_MAIL'] = 'SOCIAL@MAIL'
$_SESSION['SOCIAL_SESSION'] = 'SOCIAL_TOKEN';
This tool uses PHP Sessions and Facebook SDk, Abraham Twitter OAuth Library and Google Api Client.
https://developers.facebook.com/ https://dev.twitter.com/ https://console.developers.google.com https://en.wikipedia.org/wiki/OAuth
P.D. Let's go play !!!
Files |
File | Role | Description |
---|---|---|
composer.json | Data | Auxiliary data |
LICENSE | Lic. | License |
MyLogin.class.php | Class | Class source |
MySocial.class.php | Class | Class source |
README.md | Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.