PHP Classes

User values

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  User values  >  (Un) Subscribe thread alerts  
Subject:User values
Summary:How to view / get user values
Messages:2
Author:lyi
Date:2014-01-28 07:35:09
Update:2014-01-28 07:58:46
 

  1. User values   Reply   Report abuse  
Picture of lyi lyi - 2014-01-28 07:35:09
Hi Manuel,

thanks for this amazing work.
I am new to this whole topic and have the following questions:
- How can I retrieve the user profile data to store it in a database?
- Where exactly do I have to "intervene" in your code to perform such a test and for example write the user profile data into a file for testing purposes.

I haven't setup the whole process yet and only get to the place that your code redirects to a URL. That URL is just for dummy reasons for the moment (it exists however). Anyway, I was hoping to be able to grap the user profile data before redirection takes place.

Thanks a lot for your help.
AMR

  2. Re: User values   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-01-28 07:58:46 - In reply to message 1 from lyi
Retrieving the user profile data depends on the API of the site you want to access. Usually you need to send an HTTP request to the API using a token retrieved by this class using the OAuth protocol. You need to use the CallAPI function for that purpose.

Most examples show exactly what is the API URL you need to call to get the user profile. Take a look at the respective example script.

The redirection process is necessary to get the OAuth token, so the class can call the API with the permission of the user. The redirection target page is usually a page on which the user is prompted to give your application permission to access his profile. So you cannot skip this step.

Read this article for more details:

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