Reputation: 11
I have created a Google Plus share button for my portal user (internal user) where portal user can share the content of the portal using the Google Plus share button but unfortunately while passing the content link from the {url} its not registering the url and in preview popup window. It is showing 'link is not valid'. The link which I wanted to share is something like below:
https://example.force.com/portal/apex/homepage?id=kJ054000000CbSXXXX&l=en_US
I encoded it before passing it in the url tag. The link is basically will redirect to a customer login page and after successful login user will able to see the content.
<a href="https://plus.google.com/share?url=https%3A%2F%2Fexample.force.com%2Fportal%2Fapex%2Fhomepage%3Fid%3DkJ054000000CbSXXXX%26l%3Den_US" onclick="javascript:window.open(this.href, '', 'menubar=no,
toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" >
<img src="img.png" alt="Google+"/></a>
Upvotes: 0
Views: 2104
Reputation: 71
I had also faced a similar problem in using google plus share URL. It is also mentioned in the google plus share documentation HERE https://developers.google.com/+/web/share/ that You must properly escape any user-generated content that may occur within {URL}. But when I tested it on live server it just worked! So what I found that it will not work on local server but it will on live! you can also test it on live. My functionality is running perfect now!
Upvotes: 6