Skip to content

Instantly share code, notes, and snippets.

@kayalshri
Created April 2, 2013 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kayalshri/5291988 to your computer and use it in GitHub Desktop.
Save kayalshri/5291988 to your computer and use it in GitHub Desktop.
Geni connect by using oauth in php
<?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
Facebook
Google
Microsoft(MSN,Live,Hotmail)
Foursquare
Box
Reddit
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