Dear web2py users group,
I am trying to generate an absolute URL using the URL helper to connect
with WordPress.com.
Here's the code:
wpcc_consts = {
"client_id": '12345', #Joe's
"redirect_uri": URL(f='connected', scheme='http', host=
'joecodeswell.com', url_encode=False),
# see http://developer.wordpress.com/docs/oauth2/
"wp_authorize_endpoint":
"https://public-api.wordpress.com/oauth2/authorize",
"wp_token_request_endpoint":
"https://public-api.wordpress.com/oauth2/token",
"client_secret": "blablabla", #Joes
}
params = {
"response_type": "code",
"client_id": wpcc_consts['client_id'],
"redirect_uri": URL(f='connected', scheme='http', host=
'joecodeswell.com', url_encode=False),
}
authorize_url_0 = URL(a='oauth2', c='authorize', f='', vars=params, scheme=
'https', host='public-api.wordpress.com', url_encode=False)
In [16]: authorize_url_0
Out[16]:
'https://public-api.wordpress.com/wpcomconn/oauth2/authorize?client_id=34759&redirect_uri=http://joecodeswell.com/wpcomconn/default/connected&response_type=code'
Question
Why is 'wpcomconn', the name of the app in which this is getting executed,
showing up right after 'public-api.wordpress.com/'? In the absolute URL
spec i defined a='oauth2', but it shows up after the current app.
Thanks for the help in advance.
Love and peace,
Joe
Love and peace,
Joe
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.