forked from jeffhodsdon/HTTP_OAuth
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathauthorize_url.php
39 lines (35 loc) · 1.12 KB
/
authorize_url.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* HTTP_OAuth
*
* Implementation of the OAuth specification
*
* PHP version 5.2.0+
*
* LICENSE: This source file is subject to the New BSD license that is
* available through the world-wide-web at the following URI:
* http://www.opensource.org/licenses/bsd-license.php. If you did not receive
* a copy of the New BSD License and are unable to obtain it through the web,
* please send a note to [email protected] so we can mail you a copy immediately.
*
* @category HTTP
* @package HTTP_OAuth
* @author Jeff Hodsdon <[email protected]>
* @copyright 2009 Jeff Hodsdon <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @link http://pear.php.net/package/HTTP_OAuth_Provider
* @link http://github.com/jeffhodsdon/HTTP_OAuth_Provider
*/
include_once 'HTTP/OAuth/Consumer.php';
$consumer = new HTTP_OAuth_Consumer(
$config->consumer_key,
$config->consumer_secret,
$config->token,
$config->token_secret
);
try {
echo $consumer->getAuthorizeUrl($config->authorize_url);
} catch (Exception $e) {
echo $e->getBody();
}
?>