I am really sorry if this is confusing, I really had no idea how to word this.
I have a Hybrid App, and I want to allow a user to log via Twitter. I am using TwtterOAuth. Using Ajax load, I am able to get the authorising page into the app I do this by setting a php file on a server, which the app calls. This is then loaded into a div on the app, albeit a little messy.
But the user needs to sign in, and then authorise. Which I think is 2 refreshers. On the last refresh it should send me the users tokens which I can then use in telerik backend to set up the user. I am unsure how I can retrieve the JSON object out of the last refresh of the PHP file, and use it in the app. Normally one would use $.getJSON. But because there needs to be interaction, I am not sure how to do it ?
So I am using a modal div to load the auth:
$('#twitterModContainer').load('http:twcall.php');
Which shows me the authorise page on Twitter, waiting for the user to login, and click authorise. How would one proceed ?
You can pass data as a second argument on .load() function.
$('#twitterModContainer').load('http:twcall.php',{ data: value });
This will get passed as arguments which you can latter call them on the script as :
$_POST["data"]