LinkedIn Link to Google Plus Profile

Today I realised the Google Plus profile link in my LinkedIn profile didn’t actually work. At the time I added the link I forgot to check it. This was the url I put on the profile:

https://plus.google.com/117330811303735761777/posts

Now what LinkedIn doing was adding ‘#!’ (called shebang or hashbang) turning it into:

https://plus.google.com/117330811303735761777/posts#!

The part of url after # in Google Plus is used for redirection and when Google Plus sees the exclamation mark after the hash it just doesn’t know what to do and redirects to the following 404 page:

Google Plus Shebang 404What I learned from a stack overflow question was that the part of the url after hash is never sent to the server. I confirmed that with curl. The problem was finding out how to avoid this from happening.

Failures

I tried using some redirectors like gplus.to and the shebang was still sent all the way to google plus. I tried using my Google+ short url +OmerCanKaradagli and Google+ still parsed # and redirected to the same 404 page.

I then found out something on LinkedIn redirector. It doesn’t add shebang when the URL already has a hash in it! I thought I can use this considering Google+ uses hash to do redirects. So I used the following:

https://plus.google.com#117330811303735761777

I noticed the issue with this the next day. Google+ home page can only be accessed by those that are logged in to Google+!

Solution

I found out something on LinkedIn redirector. It doesn’t add shebang when the URL already has a hash in it! I thought I can use this considering Google+ uses hash to do redirects. So following is the end result:

https://plus.google.com/107350354213838732087#103779116939485441869

What happens is,  browser goes to Google Plus page of Linkedin (the first long number) and while loading the page some of the JavaScript gets run and the JS parses the url and redirects all the way to my profile page.

What are those long numbers?

To those who might not know, those long number at the end of the URL are Google+ profile IDs. The first number just after the forward slash is profile ID of LinkedIn page. The one after the hash is my profile ID.  If you have your Google+ URL like google.com/+YourName, it might not be easy to find. To get it, you will need to hover over the your name in any of your posts.

plus_profile_id

Leave a Reply

Your email address will not be published. Required fields are marked *