Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Plus share in a popup

Tags:

google-plus

I'm trying to build a Google+ share feature on a website just like the one you see on questions here at stackoverflow. When you click that Google+ button an a question it opens a new window to a URL like this: https://plus.google.com/share?url=http://www.stackoverflow.com

I've experimented with this and found that for some reason it only works for a few domains, including stackoverflow.com. For example google.com: https://plus.google.com/share?url=http://www.google.com or eff.org: https://plus.google.com/share?url=https://www.eff.org

Other domains like: https://plus.google.com/share?url=https://www.cnn.com or: https://plus.google.com/share?url=https://www.revision3.com just redirect to my Google+ homepage.

What am I missing here? Why do some domains work and others don't? Is there some metadata present on the pages that work that is missing from the ones that don't? Or perhaps those domains that work were added to some Google+ beta program that I'm not aware of?

like image 209
Mark B Avatar asked Jan 26 '12 17:01

Mark B


1 Answers

It looks like the new share URL is live now for all domains. The mobile 'hack' no longer appears to work, but something like this: https://plus.google.com/share?url=http://favo.rs does

like image 196
Scott Avatar answered Sep 22 '22 15:09

Scott