encode the sharing uri