PHP Classes

Oauth access token into database

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  Improving the Protect...  >  All threads  >  Oauth access token into database  >  (Un) Subscribe thread alerts  
Subject:Oauth access token into database
Summary:saving the access token and reusing it without asking for login
Messages:46
Author:Prabhulal Ramesh
Date:2014-11-20 12:59:04
 
  1 - 10   11 - 20   21 - 30   31 - 40   41 - 46  

  1. Oauth access token into database   Reply   Report abuse  
Picture of Prabhulal Ramesh Prabhulal Ramesh - 2014-11-20 12:59:04
I am using the php authentication as a backend program for my share purpose ,using linked in and tumblr . i am able to successfully share the post after logging in.

i want to know how to make another share after six hours by getting the access token from databse

  2. Re: Oauth access token into database   Reply   Report abuse  
Picture of Justin Justin - 2014-11-20 18:01:00 - In reply to message 1 from Prabhulal Ramesh
I suggest you use the built in methods for doing this.

Take a look at this file for an example.
FILE: mysqli_offline_access_to_google

I haven't done it for linkedin etc. But the concept should be the same.



  3. Re: Oauth access token into database   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-11-20 18:17:27 - In reply to message 1 from Prabhulal Ramesh
Yes, as Justin suggested it is better to use available classes if possible.

Take a look at this article for more details.

phpclasses.org/blog/package/7700/po ...

  4. Re: Oauth access token into database   Reply   Report abuse  
Picture of Prabhulal Ramesh Prabhulal Ramesh - 2014-11-21 04:26:24 - In reply to message 3 from Manuel Lemos
I was trying to make changes in mysqli_offline_access_to_google.php by changing the server name and client id , but i got this error... can u guys please help.

but when i am using the login_with_linkedin.php separately it just works ... but no database there please help...


Error: Linkedin is not yet a supported type of OAuth server. Please send a request in this class support forum (preferred) http://www.phpclasses.org/oauth-api , or if it is a security or private matter, contact the author Manuel Lemos mlemos@acm.org to request adding built-in support to this type of OAuth server.

  5. Re: Oauth access token into database   Reply   Report abuse  
Picture of Prabhulal Ramesh Prabhulal Ramesh - 2014-11-21 04:32:13 - In reply to message 3 from Manuel Lemos
still am not able to get the login screen of linkedin server


Also i have a doubt about this , i am using mysql database , what should i change , is there any difference between mysqli and MySQL ??

/*
* Create an object of the sub-class of the OAuth client class that is
* specialized in storing and retrieving access tokens from MySQL
* databases using the mysqli extension
*
i read this above line... but dont know how to create a class too.

  6. Re: Oauth access token into database   Reply   Report abuse  
Picture of Justin Justin - 2014-11-21 04:36:12 - In reply to message 5 from Prabhulal Ramesh
Hey it looks like your using the Google file, but trying to access linkedin.
Make sure all your settings are proper, not just the 'keys'. There are server variables in there too.

Did you run the SQL file to setup your MySql database?
Did you place in the proper credentials to connect to the db?

Double check your files....

  7. Re: Oauth access token into database   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-11-21 04:44:25 - In reply to message 4 from Prabhulal Ramesh
The server variable should be set to 'LinkedIn', not 'Linkedin' as you have.

  8. Re: Oauth access token into database   Reply   Report abuse  
Picture of Prabhulal Ramesh Prabhulal Ramesh - 2014-11-21 04:51:10 - In reply to message 7 from Manuel Lemos
ya that error i got resolved , now i have a doubt whether , mysqli and mysql are same ?? i know only mysql ... what changes should i do ?

  9. Re: Oauth access token into database   Reply   Report abuse  
Picture of Prabhulal Ramesh Prabhulal Ramesh - 2014-11-21 05:03:24 - In reply to message 6 from Justin

Error: it was not found the OAuth session for user 1 ..... ya i connected the database but i got this error , first time i should run which page ??

  10. Re: Oauth access token into database   Reply   Report abuse  
Picture of Justin Justin - 2014-11-21 05:15:23 - In reply to message 8 from Prabhulal Ramesh
All mysqli is,
MySQL Improved (extension).
php.net/manual/en/book.mysqli.php#b ...

 
  1 - 10   11 - 20   21 - 30   31 - 40   41 - 46