Linkedin share functionality bug - popup auto resizing - javascript

When I go here:
https://developer.linkedin.com/plugins/share-plugin-generator
provide some URL (i.e. google.com), and click on the button, new window popup is opening with some weird behavior - window automatically changes it's own size:/
The same problem will happen when you open popup window manually using JavaScript, with LinkedIn share URL: https://www.linkedin.com/cws/share?url=http%3A%2F%2Fgoogle.com
Problem is in Chrome (Win7), but FF (Win7) works fine. Is there anyone who can reproduce it? And can suggest any solution how to fix this behavior?
EDIT:
It seems that LinkedIn has fixed this issue as can't reproduce anymore.

So, since LinkedIn has been acquired by Microsoft, the way sharing works has been entirely redone.
Your documentation link just goes to a blank page, it doesn't even 404 or error out. Anyway, here is the new documentation link: Official Microsoft LinkedIn Share API Documentation
All you should need to make this work is to use this as your URL:
https://www.linkedin.com/sharing/share-offsite/?url={url}
Wouldn't it have been nice to have known that the URL and the API for sharing has changed entirely? If you are interested in a regularly maintained github project that keeps track of this so you don't have to, check it out! Social Share URLs

Related

Instagram app's native browser for Android not copying to clipboard from code

My first question here after more than a year of daily use. :)
Never needed to ask something that wasn't already answered. But thist time I tried some research here and everywhere, but didn't find a solution. I see some old questions about this browser, and people trying to find workarounds, some of them just asking users to open page from Chrome (menu option).
Most of sells from my client are made inside Instagram, and I just faced 3 issues this week:
That browser doesn't seem to respect cache headers, and is not updating the page even after 24 hours.
Redirect client from button click didn't work too: window.location.replace, window.location, location.href and all those other options to take user to another place simply do nothing.
But the main issue I didn't find a solution yet is the clipboard. The feature is copy a discount code to clipboard when button/link clicked or when code is loaded/shown. But none of clipboard methods I tried work.
Obs: Instagram for iPhone doesn't have any issue with in-app browser. Everything working as expected.
My nightmare is even worse because more than 80% of my client's users access the page from Instagram and Android.
Is there any documentation for this browser? It doesn't seem to even be listed on the MDN compatibility chart, unless it uses some other browser's engine.
For cache not updating issue, we had to change url to people who already accessed old version be able to access new one. :/
For redirect not working from click event, we had to use anchor and dinamically change href property to make that button is working. Although this would likely break the Clipboard API as it is not a click event and requires a permission request. But at least it redirects the client to the destination while I don't find better solutions for copying and redirecting by clicking.
For the main issue, clipboard, I tried these methods:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard
Using the Clipboard API or Using execCommand()
The text is from a variable, but for execCommand I used the method of using textarea element.
All of them worked very well with other browsers, but simply none of them with Instagram Android browser.
Clipboard seems to be inaccessible. :/

How can I open a mobile app (eg Facebook) via a browser redirect?

I've been searching for the past few hours for this and decided I'd just try asking.
I have a URL that people will visit, it loads a PHP page which checks a database for a specific Facebook link, and then instantly redirects them. I want it to open the app if they have it, otherwise it will go to the browser version.
The issue I'm facing is that I can't get the Facebook app to open when it's a redirect. If I instead create a button or a link and I tap on it, it will launch the app correctly, but navigating to that same link without the user interaction will not work.
I know it's possible because I've seen it done elsewhere, but I guess there is something I'm missing.
I've tried using headers("Location: fb://profile/username") and have also tried other Javascript options such as window.open, window.location, window.location.href and window.location.replace
So far I've only tested this an on android phone. The link initially launches in the chrome app.
If you have a look at this Youtube video, you'll see it's doing what I want to do. It goes to a website and then straight away launches the app.
https://youtu.be/Acl7JnRFxzI?t=17
Thanks!
I think you talked about Deep linking.
Deep linking is not supported on Web so there aren’t the same functionalities as on Android and iOS. You still need to guide your users in the right direction, so we recommend adding a link to your login page.

403 (forbidden) on end user's console

I have an application that seems to be working across the internet. But I fielded a call from an end-user who is having difficulty using the website
I asked her to send a screenshot of the console error and recieved this:
From searching stackoverflow it looks like its a permissions issue, but the site works for everyone else. Is this on her end or mine?
UPDATE I should've mentioned that is user works from a school. Perhaps her IT admin has blocked some internet resources?
Have end-user tried different browser? i would say it's some plugin stopping to load that script. If your app is working everywhere then it can't be your app. Ask end-use to try another browser and for check if end-user has any plugin witch can also cause this.
The problem may also come from lealfet or google map.
We can se that the page is currently loaded, css ans content seems fine, only the map part seems to be broken. So i don't think there is a problem with your server/website, I would put the fault on the others.
Note : we see that leaflet only is concerned when looking carefully at the screenshot.
Edit : in some cases, you can make a local copy of these external file, check whether the user need them or not, then load them as rescue.
Update : Either the school did block leaflet, or leaflet did automatically block the school as their bandwich use can excess what they allows by user, or due to abuse of any kind.

Custom URL without "cannot open" error

I've implemented custom URLs in my app, and they work fine. I've also implemented custom landing pages that show different videos based on a query parameter.
1) I would like to generate links for Twitter, email, etc. that launch my app if the user clicks on a link on a mobile phone. If the user does not have the app installed, it should go to the landing page in the mobile browser. The link should go to the landing page if clicked on major desktop browsers.
2) On the landing page, I would like to have a link to open up the app. If the app isn't installed, the link should open the app store listing.
On StackExchange and Google, I've found these proposed solutions:
A) http://mobify.me/static/tests/test-app-link.html
B) http://aawaara.com/post/74543339755/smallest-piece-of-code-thats-going-to-change-the
These solutions are for part 2) above. However, even the canonical version like A) still generates a "cannot open" error in Mobile Safari before redirecting.
Can anyone tell how to write a redirect service for 1) above?
I'd also love a pointer to a good example of how to handle 2) without a error alert box.
You question is fairly long but I am pretty sure this link is what you are looking for: http://support.mobileapptracking.com/entries/25539969-How-to-Deeplink-to-Your-Mobile-App-from-Your-Website
We used the concepts to create something similar to what you are looking to do.
OK, my friend and former CTO gave me an awesome pointer. You can use a iframe to check, which is a solid technique. He has an example, which I can confirm works well on mobile safari.
Here is the code and example on github:
https://github.com/hampusohlsson/browser-deeplink
Hope that helps!

Why does IE8 running on XP and Win7 Virtual Machine deletes the history while browsing the same site with javascript routing?

I am using sammy.js with my asp.net mvc web application for client-side routing so as to provide single page user experience. I have created a demo application which works fine in IE9+ and other modern browsers.
However, while running in IE8 on XP and Win7, I'm facing a strange problem. While browsing this demos site, IE8 remembers the back and forward navigation for initial browsing and then it totally forgets about the browsing history or steps I have taken to reach the
current page. So, the back button gets disabled as there is no browsing history linked. This is not happening in other browsers and they remember the pages I'm browsing.
This is the link of the script that I have written where I have defined my sammy.js routes.
The structure of my app is like this - A User:
comes to http://www.abc.com/
is shown a login page as per #/ route
if authenticated, home page is shown which is a result of ajax post action.
home-page have many options to go to details page which is the result of ajax post action.
Now, IE8 remembers only some of these steps but keeps deleting the history items in the browsing session on its own. I have tried using the script debugger of IE and no error was showed.
On every route, I have also tried using alert(history.length); which gives different random number not I was expecting like +1 every-time I visit a new page. Then I found this support information on Microsoft's website. Disabling the automatic crash recovery feature didn't helped in this case.
I'm not able to figure out the reason behind this strange problem. The codes works fine for other browsers. I have also tried resetting IE8 on XP and Win7.
It would be really helpful if anyone can tell me what am I missing or doing wrong.
Cheers
I have really tried many things to identify any possible reason of the issue above. Even rewrote all my javascript navigation code and checked server-side code.
But the only place where I got the solution is at site: enhanceie which states that there is a bug in IE8 which reads like:
IE0012: IE Travellog broken when navigating back/away from a page with
a large POST form If there is a form input field with a value longer
than 523,659 characters, when you navigate away from the page, IE may
clear the current session's travellog (similar to history), disabling
the back and forward buttons. Repros in IE6 & IE7.
There are following solutions that you can go for:
Check for the input field that has lots of characters as mentioned above and solve your problem.
If you have control over the system where IE8 will be used, you can add the following registry key on that machine. There is no existing key, so, you need to add a new one:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\TravelLog] "MaxSize"=dword:ffffffff
I am really relaxed to find this information as I spent really long time to solve this issue. Hope this will help someone.

Categories