Skip to main content

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.

javascript - supply redirect uri page within app? - stack overflow

learn, share, build

each month, on 50 million developers come stack overflow learn, share knowledge, , build careers.

join world’s largest developer community.

sign up

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.

share|improve question
    
can clarify needs happen? click link, take me away page (to oauth authentication page, presume), , when oauth kicks me redirect_uri want javascript function execute automatically on page load? – voteydisciple jul 7 '12 @ 14:11
    
@voteydisciple updated question. you're saying. presume best thing redirect js function within jquery mobile app - don't know certain. – stephen furlani jul 7 '12 @ 14:19

your answer

 
discard

posting answer, agree privacy policy , terms of service.

browse other questions tagged or ask own question.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -