开发者 |
wokamoto
megumithemes |
---|---|
更新时间 | 2013年7月16日 17:09 |
捐献地址: | 去捐款 |
PHP版本: | 2.8 及以上 |
WordPress版本: | 3.5.2 |
oauth-provider
folder to the /wp-content/plugins/
directory.http://example.com/
)
http://example.com/oauth/request_token
The URL to obtain a Request Token.http://example.com/oauth/authorize
The URL to obtain User authorization.http://example.com/oauth/access_token
The URL to issue an Access Token.http://example.com/oauth/(method name)
The URL to call a OAuth method using a Consumer key and an Access Token.sayHello
, which is implemented in this plugin for now, is simply returning a user name.
You can register a method using add_oauth_method($name, $method)
.
You can use this function like add_filter()
.
You can easily add the sayHello method like below:
add_oauth_method('sayHello', create_function('$request, $userid, $username', 'return "Hello {$username}!";'));
To execute the registered sayHello method, access the URL below:
http://example.com/oauth/sayHello