Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Mobile + Twitter oAuth
    text
    copied!<p>I have a mobile web app that is using jQuery mobile. I am using Twitters API to register users and log them in. </p> <p>When I load the app I have a splash screen with a button. When you click on the button it directs to the oauth script:</p> <pre><code>&lt;?php require("lib/twitteroauth.php"); session_start(); // The TwitterOAuth instance $twitteroauth = new TwitterOAuth('YOUR_CONSUMER_KEY', 'YOUR_CONSUMER_SECRET'); // Requesting authentication tokens, the parameter is the URL we will be redirected to $request_token = $twitteroauth-&gt;getRequestToken('http://glnce.com/oh/login.php'); // Saving them into the session $_SESSION['oauth_token'] = $request_token['oauth_token']; $_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret']; // If everything goes well.. if($twitteroauth-&gt;http_code==200){ // Let's generate the URL and redirect $url = $twitteroauth-&gt;getAuthorizeURL($request_token['oauth_token']); header('Location: '. $url); } else { // It's a bad idea to kill the script, but we've got to know when there's an error. die('Something wrong happened.'); } ?&gt; </code></pre> <p>However I get an error when I click on the button from the splash page. It isn't a php error but I am assuming it is a jQuery Mobile issue. I'm also assuming its because I am trying to change the header. </p> <p>Any thoughts on how to change the header to the $url so that it doesn't open safari and it stays in my web app?</p> <p>I know this is vague but I'm not sure how else to explain it. I just need to run this script without it opening a new window. </p> <p>Thanks! </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload