User authorization

This is an example for User Authorization using the Hyves API.

More information at: http://hyves.doyourthing.nl/.

Notice

Retrieving of request tokens failed.

Request tokens

This example will use the Hyves API method auth.requesttoken to get the request tokens. In the call you supply the Hyves API methods you would like to use and the expiration type. You need them later, so save them. This examples stores it in the session variable (see the result of print_r($_SESSION); below).

Authorization URL

Now we have the request tokens (oauth_token and oauth_token_secret) we can build an authorization URL. This URL contains two parameters, which are oauth_token and oauth_callback. The oauth_callback parameter is the URL Hyves should return to after the authorization process.

Access tokens

Please visit the authorization URL to follow the authorization process. When the oauth_callback is requested, the Hyves API method auth.accesstoken is used to obtains access tokens. The call is signed using the request tokens. After this point the request tokens are completely useless.

$_SESSION

This examples stores it's data in the session variable, see the result of print_r($_SESSION); below.

Array
(
)