Skip to content

Instantly share code, notes, and snippets.

@kayalshri
Created March 27, 2013 12:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kayalshri/5253865 to your computer and use it in GitHub Desktop.
Save kayalshri/5253865 to your computer and use it in GitHub Desktop.
Wordpress oauth php connect
<?php
include "socialmedia_oauth_connect.php";
$oauth = new socialmedia_oauth_connect();
$oauth->provider="WordPress";
$oauth->client_id = "2327";
$oauth->client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$oauth->redirect_uri ="http://ngiriraj.com/socialMedia/oauthlogin/wordpress.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