0

I'm trying to share text and image on user's google plus stream. This text and image would be set by me. What I'm trying to achieve is, User will login to his google plus account(if not login) and then this text and image will be automatically post to his stream.

I've tried this method for sharing

https://plus.google.com/share?url=https://encrypted-tbn0.gstatic.com/images?q%3Dtbn:ANd9GcRt6YQ8bwQdOVZqTG7wls93F-bwbENvH292Lfx_TBOY9lLYL5X5RhXVRvk&hl=en

It is working fine but I want to execute this using curl or jQuery so that I can set the text and image to the respected fields and submit this at my end.But in this I'm not getting that how is it working because it is not a form.

Please help me how to do this.Please let me know if I can do this with other way.

I've go through these links also but didn't find anything useful.

https://developers.google.com/+/api/

http://www.nextscripts.com/google-plus-automated-posting/

https://developers.google.com/+/web/embedded-post/

http://www.sanwebe.com/2012/11/login-with-google-api-php

https://github.com/google/google-api-php-client

set text to google+ share button

Community
  • 1
  • 1
Vandana Pareek
  • 234
  • 3
  • 13

2 Answers2

0

There are two ways to automate posting to Google+. One is app activities which do not show up on Google+ streams and Google Apps users can create posts that are limited to their domain.

Outside of those two options posting to Google+ has to be done with an explicit click by the user on Google owned UI. Interactive posts and the share button are the best options.

abraham
  • 46,583
  • 10
  • 100
  • 152
0

As you can see in Official Documentation

Share Endpoint

The share link invokes the Google+ share endpoint, which you can also link to directly:

https://plus.google.com/share

The Google+ share endpoint accepts the following only query parameters:

  1. url The URL of the page to share. This value should be url encoded.
  2. hl The language code for the locale to use on the Google+ sharing page.

So only this is available

https://plus.google.com/share?url=http://www.Google.com

or

https://plus.google.com/share?url=http://www.Google.com&hl=ar

or

https://plus.google.com/share?url=http://www.Google.com&hl=en

The only way to prefill the text of a share is to use Interactive Posts as enter image description here

You can do that by set of steps as Full Example here

HMagdy
  • 3,029
  • 33
  • 54