Closed FedeM closed 8 years ago
Have you added the InAppBrowser plugin? If you are testing in XDK emulator, instead of localhost use some domain, like www.example.com, it can be anything.
I have already included the InAppBrowser plugin but not know how to access the data.
Apparently the system is running since the first time I tried it I opened the window logon in the same app and now only redirect me to start redirect_uri address.
I did a test to put any other direction and appears this:
"The redirect_uri URL must be absolute".
I was also watching guide Using Intel "Oauth 2.0 login for HTML5 apps" and in "Get the access_token from the redirected URL hash fragment" contains the following code:
$(loginWindow).on('loadstart', function(e) {
var url = e.originalEvent.url;
var access_token = url.split("access_token=")[1];
...
}
That code would not know how to use it since I hit in the event function (token, response) but never executed.
the login window should not open in same app, it should popup a modal view in the app, there should be a back button when login screen is loaded, if not your InAppBrowser is not setup correctly
The login window opens in a popup. My problem is not how to get user data in the case of using Facebook to get "basic_info" and in the case of Google "profile".
I apologize for being so upset, I have never used these functions.
I managed to send the access token to the server, now the problem is that it is not sending the state and will not let me access to the data, the error:
"Facebook SDK returned an error: Cross-site request forgery validation failed. Required param "state" missing."
How I can do to send the state?
specify it in other_params: {scope: 'basic_info', display: 'popup', state: '123'}
Thank you very much for the prompt response, I can give as solve my problem.
Recently I've been trying to make a system login with Facebook to use it in Indel XDK and I am unable to get the token once you've logged.
I'm using the sample code and adapted:
The problem is that I console.log in function (token, response) to see the token obtained but only reedirecciona me redirect_uri window.
I'm new to the subject and would not know Oauth well as theme redirect_uri, if would have to have a specific code or the address where you would only have to go once authentication has been made.