I send out Password reset links that are of the following format
https://example.com/login?email=123#456.com&tmpPas=qwertyuiopasdfghjkl
Some small percent of users are reporting that when they click the link the email and password parameters are not carried over to the website.
So far they have reported this issue on IE11 and Safari on Ipad. What could be causing this and what are the possible solutions to reduce the occurence.
I have been able to reproduce this on an Ipad mini each time. Even if i paste the URL in the browser it does trigger the reset flow. While from any other device it does work.
in the console logs i see this
SCRIPT5009: 'URLSearchParams' is not defined
Here is the relevant code
let url = new URL(window.location.href);
let searchParams = new URLSearchParams(url.search);
let emailAddress = (searchParams.get('email'));
let tempPass = (searchParams.get('tmpPass'));
Found that the URLSearchParams is not supported on all browsers. Found this code in this answer that did it https://stackoverflow.com/a/20097994
Related
In it's FAQ, WhatsApp explains how to create a new, prefilled message where the user can choose the contact to send the message to:
"To create a link with just a pre-filled message" from the FAQ Page here: https://faq.whatsapp.com/iphone/how-to-link-to-whatsapp-from-a-different-app
The link looks like this: https://wa.me/?text=I%27m%20inquiring%20about%20the%20apartment%20listing (example from the FAQ Page).
However, since a few days this seems not to work anymore on iOS and Desktop (Android Phones seems not to be affected yet).
The link with a phone number (https://wa.me/123456789?text=The%20message%20to%20send) is working just fine. The workaround with just adding "0" as the phone number doesn't work either as whatsApp will throw an error that the contact could not be found.
Has anyone else run into the same problem? And found a soution / workaround?
Your URL seems to be wrong. You need to append URL path which is /send in your URL string. You seem to be adding the URLQueries right after the base URL. Also, use addingPercentEncoding for encoding.
guard
let urlString = "whatsapp://send?text=\(text)"
.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
let unwrappedUrl = URL(string: urlString) else {
return nil
}
I'm trying to authenticate with Uber's API using watchOS 6.2's new OAuth capability ASWebAuthenticationSession:
ASWebAuthenticationSession(url: uberUrl, callbackURLScheme: scheme) { (URL?, Error?) -> in {
print(callbackUrl, error)
if let url = callbackUrl {
let components = NSURLComponents(string: (url.absoluteString))
if let t = components?.queryItems?.filter({$0.name == "code"}).first?.value {
self.token = t
}
}
}
When I run it, an adorable little web browser comes up on the Watch and prompts for a "E-mail or Mobile Number", after entering my e-mail, clicking on "Next" pops up a text entry window which then suddenly disappears, leaving me back at e-mail entry. The subsequent clicks on "Next" brings up a text entry window which only allows me to edit the e-mail address. Password is never an option. I never got the closure to complete, not even with en error.
If I scroll down to "Login with Google", then Google's login page loads, and lets me enter e-mail and password, and the completion block executes (I get a nil token presumably because my Uber account is not a Google one).
I suspect an issue with Uber's login webpage, but can't verify that other than observing that Google's seems to work. Also, I can find no documentation on the callbackURLScheme parameter with respect to watchOS. I create a scheme in the plist as one might with an iOS app, but can't confirm this is the correct procedure. Nonetheless, it doesn't change the fact that the password field will not come up on Uber's oath login page.
Searching StackOverflow for watchOS and ASWebAuthenticationSession produces no results at this point.
Is anyone else trying to do this right now? Has anyone had success? Am I missing something important, or is this simply an error on Uber's part?
I'm trying to implement Firebase Dynamic Linking.
i have created project on firebase console and provided the required
value(prefx and appid).
i also have allowed the association domains from developer console
and it is sucessfully showing true flag.
in xcode i have on the feature of association domain and added the url identifiers etc.
Problem: still the problem i'm facing is that Association Domain Section says
Add the Association Domains feature to your App ID.
don't know whats the reason why i'm getting this error.
The screen shot is also attached for prove.
i have figured this out by searching for long time.
This is basically not a big issues the error
“Add the associated Domains feature to your App ID”
Will go away once you enable the Associated Domains in your APP ID in developer.apple.com. If it doesn’t go away, quit and relaunch the xcode few times and it will work.
reference: https://medium.com/#abhimuralidharan/universal-links-in-ios-79c4ee038272
I had a similar problem. The problem was solved when I turned off and turned on the feature in Capabilities. But then I had several entitlements files in different folders. Steps to combine these files into one:
Open in text editor MY_PROJECT_NAME.xcodeproj\project.pbxproj
Find CODE_SIGN_ENTITLEMENTS and set correct path. Example:
"MY_PROJECT_NAME/Entitlements/MY_TARGET_NAME.entitlements"
I do not recommend using a standard text editor, since it can automatically replace some characters in the file while saving.
You need to add Associated domains to your App Capabilities. Please see screenshot. Add applinks:yourdomain.com
Then Use below code to get Short URL
guard let link = URL(string: "https://www.yourdomain.com/share_location.html?Id=\(RandomID)&uid=\(uid)") else { return }
let dynamicLinksDomain = "yourdomain.page.link"
let components = DynamicLinkComponents(link: link, domain: dynamicLinksDomain)
// [START shortLinkOptions]
let options = DynamicLinkComponentsOptions()
options.pathLength = .unguessable
components.options = options
// [END shortLinkOptions]
// [START shortenLink]
components.shorten { (shortURL, warnings, error) in
// Handle shortURL.
if let error = error {
print(error.localizedDescription)
return
}
print(shortURL?.absoluteString ?? "")
}
I am having a problem getting Facebook events in the Facebook app. For example, to open an event with the url "https://www.facebook.com/events/1743847059178738/," I would use the following code:
let facebookURL = NSURL(string: "fb://event/1743847059178738")!
if UIApplication.sharedApplication().canOpenURL(facebookURL) {
UIApplication.sharedApplication().openURL(facebookURL)
} else {
UIApplication.sharedApplication().openURL(NSURL(string: "https://www.facebook.com/events/1743847059178738")!)
}
}
It will open the Facebook app, but no matter what event I attempt to display I get a screen saying "Unable to load event. It may have been cancelled." I have tried substituting the Facebook URL of an event for that of a profile (e.g., string: "fb://profile/100005906912309") and it works just fine. Am I mistaken in assuming that the numbers at the end of the event's URL are the same as the event's numeric ID?
So I figured out that I could bypass the whole "fb://event..." bit and just go with:
UIApplication.sharedApplication().openURL(NSURL(string: "https://www.facebook.com/events/1743847059178738")!)
I assumed this would open the link in Safari, but it automatically opened in Facebook in iOS 8.
I'm sorry for the late answer. I'd prefer to write this as comment, but I'm not able to.
First, nice work around. I think it is a perfect fallback if the fb:// scheme fails as it shown in code shared with your question. I've spent a lot of time trying to resolve the same issue. What I've found is that fb://event/{event-id} is no longer supported and it was replaced with fb://event?id={event-id}.
I've used this post as a reference.
I'm about to submit my latest app/game, and it seems something changed, since my call to Facebook's showDialog only works half way.
This is the structure I'm using to make the call which worked fine a month ago when I last tested it:
local fb_publish_properties = {};
fb_publish_properties["iTunes"] = {};
fb_publish_properties["iTunes"]["text"] = "Blabla text to be shown";
fb_publish_properties["iTunes"]["href"] = "https://The link to open on text click";
fb_publish_properties["GooglePlay"] = {};
fb_publish_properties["GooglePlay"]["text"] = "Blabla text to be shown";
fb_publish_properties["GooglePlay"]["href"] = "https://The link to open on text click";
local fb_publish_properties2 = json.encode(fb_publish_properties);
local fb_publish_params = {
app_id = facebook_appId,
from = user_fb_id,
to = user_fb_id,
picture = "http://icon picture here",
name = "Title of post",
caption = "Come play against me!!",
description = "",
properties = fb_publish_properties2;
}
facebook.showDialog("feed",fb_publish_params);
Now, as I said, this worked just fine a month ago, but now, it posts the post to the feed alright, but nothing of the properties is shown in the post, and while clicking on the post itself, it leads to the message icon (which I believe happens since he doesn't recognized any other links in the message).
First, what is wrong with Facebook, changing their API every 2 months!!?? but now really, what is wrong with the piece of code which used to work but now works only partly?
Thanks all!
UPDATE:
After not doing anything about it, just going on as normal, some of the things started working on their own, for example, now when the Facebook API opens on the device (iOs or Android) I see the texts just fine as they are supposed to be, yet when I publish to stream, the post that shows online again, shows only the caption text, not the properties texts and links, and when I click on my post online, it leads to the icon file I'm using and not to the links I've published.
This is the last thing that stops me from publishing this app, please, someone, help??!
This is not an answer, but does not fit in a comment:
Try the following to see if you get anything at all:
facebook.showDialog( "feed", {link="http://www.coronasdk.com/"} )
facebook.showDialog( "apprequests", {message="some message"} )
Please update your post accordingly, describing what you observe, then I can then erase this. Also ensure that login succeeded (the fbconnect event properties of didComplete, isError and expiration).