I'm trying to create a deep link for a predefined ride into Lyft's PWA at ride.lyft.com
I couldn't find any specific documentation for this, just for Lyft's API, so I started to experiment.
I created a session and defined a pickup & destination. This is how the window looks
Now the URL for this page seems to contaiin everything I need with the pickup and destination:
https://ride.lyft.com/request?pickup=Balboa%20Park%20Station%2C%20401%20Geneva%20Ave%2C%20San%20Francisco%2C%20CA%2094112%2C%20USA#37.7215968,-122.447511&destination=San%20Francisco%20International%20Airport%20(SFO)%2C%20San%20Francisco%2C%20CA%2094128%2C%20USA#37.6213129,-122.3789554
But when I open this URL (after validating my phone number if needed) I get a different pickup location.
Any idea how to fix this?
Would be happy to just find the official documentation.
I think it has something to do with the fact that the URI encoding is messing up your latitude and longitude coordinates.
The unescaped URL looks like this:
https://www.lyft.com/auth?next=https://www.lyft.com/mobile/start&pickup=Balboa+Park+Station,+401+Geneva+Ave,+San+Francisco,+CA+94112,+USA#37.7215968,-122.447511&destination=San+Francisco+International+Airport+(SFO),+San+Francisco,+CA+94128,+USA#37.6213129,-122.3789554
But your version looks like this:
https://www.lyft.com/auth?next=https%3A//www.lyft.com/mobile/start&pickup=Balboa+Park+Station%2C+401+Geneva+Ave%2C+San+Francisco%2C+CA+94112%2C+USA%4037.7215968%2C-122.447511&destination=San+Francisco+International+Airport+%28SFO%29%2C+San+Francisco%2C+CA+94128%2C+USA%4037.6213129%2C-122.3789554
If you take a look at the latitude and longitude coordinates, they're something like this:
USA%4037.7215968%2C-122.447511 and USA%4037.6213129%2C-122.3789554
I'm guessing that Lyft have a bug in their code and they're not properly parsing the URL when you use deep linking. They should be using decodeURIComponent(URI) to properly parse the data out of the URL.
Related
I'm using Universal Links to open a place in Google Maps since I don't really see another way.
I create a normal Google Maps links like this, which on web resolves to a place:
let urlString = String(format: "https://www.google.com/maps/place/?q=place_id:%#", annot.cafe.google_place_id)
Then I tap it on iOS and get Google Maps opened with the error that no such place could be found.
Should this work? Is there some other way to focus a specific place on iOS Google Maps?
Turns out this is possible using a search URL construction as specified here: https://developers.google.com/maps/documentation/urls/get-started#search-action
The constructed URL needs to have both the query with the lat/lon coordinates in it and a query_place_id with the place id.
It looks like this:
https://www.google.com/maps/search/?api=1&query=52.504875%2C13.394549&query_place_id=ChIJoaO7QRRRqEcRtBLLz6p4PS0
That creates the desired behaviour of the map going to the location and displaying details for the given place.
We are currently using a number of UTM codes with various companies to track a campaigns to our website. While most of them have worked without issue, three have failed to be recorded by Google Analytics and they all use the same format (two of the URLs are below). Any idea why this would be? The links themselves work, it's just GA hasn't accepted them at all.
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.semble.co.nz_mobilepay_bnz_-3Futm-5Fsource-3Dbnz-5Fapp-26utm-5Fmedium-3Donline-5Fbanner-26utm-5Fcontent-3Durl-5Fappnotification-26utm-5Fcampaign-3Dmobilepay-5Fcampaign&d=CwMFAg&c=N-xPqDyeLJg5V3gLll2thA&r=lbXMFujwGwA66Ivf0fYOaY8Dv5vHXIMr8z9PppNbh6c&m=JP3JnHYmkJ3J1YBwv9iHgnMsJJZdyrflVUuPxw_okaA&s=xT3UnMPmiP-DJPNwtQhywHsRWvmMg7PMylFMQjrGov4&e=
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.semble.co.nz_mobilepay_bnz_-3Futm-5Fsource-3Dbnz-5Fapp-26utm-5Fmedium-3Dgoogle-26utm-5Fcontent-3Durl-5Fappnotification-26utm-5Fcampaign-3Dmobilepay-5Fcampaign&d=CwMFAg&c=N-xPqDyeLJg5V3gLll2thA&r=lbXMFujwGwA66Ivf0fYOaY8Dv5vHXIMr8z9PppNbh6c&m=JP3JnHYmkJ3J1YBwv9iHgnMsJJZdyrflVUuPxw_okaA&s=wN-S93ZKKnjHZoGSPZJCTTvDk9NeqUd7zG9W5MoGwKA&e=
Thanks in advance!
You URL is not correctly builded, you must found any of this strings on your URL :
&utm-campaign=
&utm-source=
&utm-medium=
And didn't appear, seems like your system are recoding URL in some point.
I need to format this canonical URL and I cant figure out how! I've looked around the web and this site a lot and I've realized that I need a specific answer.
Problem Description:
My BLOG's desktop view has (say) URL: www.x.com/page.html
The same page in mobile view URL would be: www.x.com/page.html?m=1
Its all good and dandy to this point, but the problem comes when I use facebook comments with this. It parses url based on this: www.x.com/page.html
So, it is identifying ?m=1 in the end of the first URL as an entirely different URL.
i.e
It is treating those two URL as different
Both of them are URL for the same page and I want them to be treated the same
Could anyone provide me a way to check if the loading page is ?m=1 and if it is ?m=1 then remove the ?m=1 when sending it to facebook?
I WOULD GREATLY APPRECIATE IT IF THE SOLUTION IS INLINE if it is not inline, oh well, I just need a solution right now.
Current code snippet used is this:
<fb:comments colorscheme='light' expr:href='data:post.url' expr:title='data:post.title' expr:xid='data:post.id' height='110' width='560'/>
Let me break the question into small parts(incase someone is not a native speaker and wants to help/learn about this problem)
I want to detect if the loading page has ?m=1 in its URL or not. The canonical URL for this is data:post.url applied as
expr:href='data:post.url'
If a ?m=1 is detected from data:post.URL , I want to remove it and send the remaining URL into expr:href= so that both my URLs
are identified the same when my website displays facebook comments.
Click the image link below to look at this image please. This is the same URL but the
comments are being sent to me as if they're from different URLs. I
want them to appear under the same thread.
This is it--> http://i.stack.imgur.com/M7fK2.png
I haven't found this particular answer anywhere and I am hopeful that
some creative solutions will pop out in this site!
In your code
<fb:comments colorscheme='light' expr:href='data:post.url' expr:title='data:post.title' expr:xid='data:post.id' height='110' width='560'/>
Use data:post.canonicalUrl instead of data:post.url
This is the Blogger's layout tag for getting the Canonical URL of a blog post (This will always default to the blogspot.com domain, so there won't be ccTLD issues as well)
I'm trying to enable translating some text in my app. I want user to be able to launch whichever translation tool they use on their device (Google Translate or iTranslate) and see the translation without having to type it. For this, I'm using the url schemes:
googletranslate://
itranslate://
Now, I need to pass the query to those apps. I know how to do this for iTranslate:
itranslate://translate?from=auto&to=en&text=<encoded_string>
This is cool, now I would like to know how to do the same for Google Translate. It needs to automatically detect the language and translate it to english.
It is not currently possible to prefill UI elements in the Google Translate iOS application when opening it from googletranslate:// URLs. The contents of the URL after googletranslate:// appear to be completely ignored. So the most you can get from using these links at the moment is opening the iOS application.
If this does get implemented at some point in the future, one can test by opening a link like googletranslate://example%20text/?param=value&from=zh_TW. I would strongly recommend that you let your voice be heard on the Google Translate product forum by requesting this feature.
In the meantime, you may want to consider using Translation API to provide translations within your application. This can be achieved using the REST API.
If is there anyone still looking for the answer, you can use it like this.
googletranslate://?sl=en&tl=tr&text=hello%20world
You can change the parameters
sl = source language
tl = translation language
text = the thing you want to translate
Whats the best practice to avoid hardcoding links in iOS apps?
I need to link to an external website that does a search based on the URL query string parameters.
Ex. "http://stackoverflow.com/search?q={query}"
I dont want to hardcode the actual url in my app because I don't want the app to break if the URL changes or the query string parameters change. I'd like to hardcode into my app:
"http://foobar.com?query=someString"
and then redirect that to my actual target, ie, "http://stackoverflow.com/search?q=someString"
I looked into URL shorteners (bit.ly, goo.gl, etc) but they dont allow me to change the target URL. Looks like a URL redirection service might work but I wasn't able to find one that handles query string parameters in the way I need.
How is this problem typically solved?
thanks!
Mark
Just add a text file (or similar) on your website with the URL(s) in it, fetch it occasionally from your app. Make the app parse the text file and use it to decide what URL it should fetch.