Created
April 2, 2013 12:53
-
-
Save kayalshri/5291988 to your computer and use it in GitHub Desktop.
Geni connect by using oauth in php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
@author : Giriraj Namachivayam | |
@date : Apr 2, 2013 | |
@demourl : http://ngiriraj.com/socialMedia/oauthlogin/geni.php | |
@document : http://ngiriraj.com/work/geni-connect-by-using-oauth-in-php/ | |
@license : Free to use, | |
@History : V1.0 - Released oauth 2.0 service providers login access | |
@oauth2 : Support following oauth2 login | |
Bitly | |
Wordpress | |
Paypal | |
Microsoft(MSN,Live,Hotmail) | |
Foursquare | |
Box | |
Yammer | |
Yandex | |
Geni | |
*/ | |
include "socialmedia_oauth_connect.php"; | |
$oauth->provider="Geni"; | |
$oauth->client_id = "QJYesAAPXPv2MFC9ycBf1jh65eZc12ATXLP3fJgj"; | |
$oauth->client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
$oauth->scope=""; | |
$oauth->redirect_uri ="http://ngiriraj.com/socialMedia/oauthlogin/geni.php"; | |
$oauth->Initialize(); | |
$code = ($_REQUEST["code"]) ? ($_REQUEST["code"]) : ""; | |
if(empty($code)) { | |
$oauth->Authorize(); | |
}else{ | |
$oauth->code = $code; | |
# print $oauth->getAccessToken(); | |
$getData = json_decode($oauth->getUserProfile()); | |
$oauth->debugJson($getData); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment