javascript - Supply redirect URI to page within app? -
i'm new jquery, js, etc.
i've got phonegap/cordova app needs make oauth call , oauth call asks redirect_uri, don't know how supply redirect uri calls js function.
i'm doing this:<a href="https://instagram.com/oauth/authorize/?client_id=my_id&redirect_uri=what_do_i_put_here&response_type=token" id="instagramlogin" data-role="button" data-rel="dialog" data-theme="b" rel="external">instagram login</a>
what think should doing making ajax, js, or $.mobile.changepage() request , supplying callback function don't know how that.
so i'm looking jquery best-practices modal login dialogs how make whole thing work.
thanks,
i'm following client-side directions here, it's not question instagram api.
edit:
so need happen this:
- redirect user instagram login site
- user logs in or cancels
- i need auth_token or error message (api passes fragment on redirect uri)
- make subsequent api calls auth_token
edit:
it's frustrating because on ios i'd need is:
- (bool)webview:(uiwebview *)webview shouldstartloadwithrequest:(nsurlrequest *)request navigationtype:(uiwebviewnavigationtype)navigationtype;
add custom scheme my_app_callback://dummy.com
, detect it... can't seem figure out how in js.
i'm new jquery, js, etc. i've got phonegap/cordova app needs make oauth call , oauth call asks redirect_uri, don't know how supply redirect uri calls js function. i'm doing this: what think should doing making ajax, js, or $.mobile.changepage() request , supplying callback function don't know how that. so i'm looking jquery best-practices modal login dialogs how make whole thing work. thanks, i'm following client-side directions here, it's not question instagram api. edit: so need happen this:
edit: it's frustrating because on ios i'd need is: add custom scheme | ||||
redirect_uri
want javascript function execute automatically on page load? – voteydisciple jul 7 '12 @ 14:11