I have two problems: (IOS + XCode + PhoneGap)
After doing Hackbooks Facebook login I load an iframe which loads fine. When I click a like button from my app, it takes me to a Facebook login page. How come it does that when I'm already connected?
When the login page of Facebook comes up and I sign in, I get a blank page and I get a console error saying: "Error: executing module function 'setInfo' in module 'cordova/plugin/ios/device'. Have you included the iOS version of the cordova-1.9.0.js file?" I have the JS file in my WWW folder.
Can someone please give me a hand?
Maybe try this:
http://docs.phonegap.com/en/1.9.0/guide_upgrading_ios_index.md.html
I don't know much about Facebook logging so I can't help much with Question 1, but for Question 2 it sounds like you are getting redirected after login to a page that does not include cordova-1.9.0.js.
Your index.html must be including the js file for you app to be doing anything, but apparently you are getting redirected back to a different page, so make sure that page also has a script tag for cordova-1.9.0.js.
You need this:
<head>
<script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js">
</script>
</head>
Related
Hi I am receiving the following error (on all my sites) when the site attempts to embed a twitter account timeline. I looked at the status page https://api.twitterstat.us/ and it makes no mention of any problems with twitter...
https://cdn.syndication.twimg.com/timeline/profile?callback=__twttr.callbacks.tl_i0_profile_ingentaconnect_old&dnt=false&domain=ic.ox-dev-01.ingenta.com%3A9151&lang=en&screen_name=ingentaconnect&suppress_response_codes=true&t=1829998&tz=GMT%2B0000&with_replies=false net::ERR_ABORTED 404
fetch # widgets.js:8
Here is the embed code:
<a class="twitter-timeline" data-height="340" href="https://twitter.com/ingentaconnect?ref_src=twsrc%5Etfw">Tweets by ingentaconnect</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Note I'm based in UK if it is relevant.
This worked for me perfectly.
A workaround is to get https://platform.twitter.com/widgets.js; in its code, change https://cdn.syndication.twimg.com to https://syndication.twimg.com, store within your website and when embedding Twitter timeline, use your modified version instead of https://platform.twitter.com/widgets.js.
Here is the link on twitter where the discussion was done:
https://twittercommunity.com/t/embedded-timeline-does-not-show/168085/10
We've had the following iOS message appear when logging in to our website:
Is there a file we can place into our website's root folder to tell iOS to redirect to the following exact URL rather than just our homepage when a user taps on Change Password on Website?
www.example.com/pages/reset-password/
One way to do it is by setting up a /.well-known/change-password redirect on your server to your actual password reset page.
Using your example, create a redirect from https://www.example.com/.well-known/change-password to https://www.example.com/pages/reset-password/ That's it. For the redirection, use the HTTP status code 302 Found, 303 See Other or 307 Temporary Redirect.
Alternatively, you could serve an HTML page at /.well-known/change-password with a <meta> tag using an http-equiv="refresh".
<meta http-equiv="refresh" content="0;url=https://www.example.com/pages/reset-password/">
The redirect is supported in Safari and Chromium-based browsers, and there's a W3C spec that defines the behavior. More details in https://web.dev/change-password-url/
In my application
1) the user clicks on the C2QB button
2) the OAUTH popup window appears
3) the user authorizes access to QB account
4) the authorization works
but...
the popup does not close. My application runs in the popup browser. The authorization works.
I can't figure out what I am doing wrong.
From the accessToken(and accessSecret) callback handler redirect to an intermediate page to close the child window and to take the control to the parent page.
<script type="text/javascript">
window.opener.location = '<%=APP_URL%>/home.htm';
window.close();
</script>
Thanks
I found what I was doing wrong. I was using Server.Transfer to go to new pages in my app instead of Response.Redirect. This causes the URL in the browser to not update. Which caused the window.close statement in OauthHandler to not execute. Thanks for your help.
I am in the process of creating an iOS app with Phonegap and jQuery, however, I am running into issues trying to allow both iFrames (to load normally) and external URLs (to open in Safari). I decided to choose the path of using iframes as I was not able to send POST and open the resulting page in Safari (i was trying to create a mobile friendly login window that opens to the full site in safari).
I recently updated to v1.5 hoping to resolve the issue, but it still occurs.
I have tried the trick "[url scheme] isEqualToString:#"http"...." however this forces any page in the iframe to load in safari.
So, I would like either to have external URLs and iframes to behave just like it does in a Webapp (add to homescreen button on iOS) or be able to send POST to Safari?
Has anyone got ideas? :)
Thanks!
You could change tactic slightly and login fully using your app, but then create an authentication token which would be passed via a standard link to be opened in safari.
You could generate the token new each time. Tokens are a valid system for access.
I am trying to integrate my Rails application within another application using the "iframe" technique.
The hosting application has an iframe like that:
<iframe src="http://10.0.0.106:3000/" width="800" height="500">
</iframe>
This frame retrieves and displays the login page, which is ok. But when I type in username and password to login, it seems that authentication fails and I am prompted again for login. Note that no normal "Wrong username/password" message appears (as it is done when I give wrong username of password). The login form is displayed as if it were the first time I visit it.
Any clue?
If the CSRF token is included on the page the only problem that you should experience with iframes is this IE weirdness :
http://www.sympact.net/2008/07/rails-and-ifram.html
Is the iframe being served from another domain? This is probably a security feature.
You could turn off the security feature (probably a bad idea), or try other methods of authentication.
"Yes. It is served from another domain."
— Comment above.
Reason why you are not getting an error message is because the authentication doesn't fail. The cookie that's being stored is for '10.0.0.106:3000' and not your current application. I wouldn't be using an iframe to handle authentication. (Why are you doing this anyway?)