Shorten url added when sharing

It detects network availability before doing so.