简体   繁体   中英

Google+ API - Posting a moment using PHP

I am using a Codeigniter Library ( https://github.com/samwierema/google-plus-api-codeigniter ), I can get the login credentials for a user and am storing the GooglePlusID and all access tokens in a DB.

My problem is that I am struggling to "Post a moment" on Google+, I've had a look through the code and suspect that it is quite old and may not have the option to do so.

I am currently trying

$google_plus_id = '';
$this->googleplus->people->insert($google_plus_id, 'vault', 'This is a test from my platform');

I have had a look at the "third_party" folder and cannot seem to find a mention of moment posting.

I am wondering if anyone has used the library and could possibly point me in the right direction of getting this to post / work.

Thanks

Problem is that the client library included in the project is completely out-dated, coming from a time where there weren't any moments available in the Google+ API yet.

You can get a newer version of the client library that should be compatible with the library you are trying to use from here: https://code.google.com/p/google-api-php-client/

If you exchange the files in the third-party folder with the new ones it should work.

It would be even better to update to the newest PHP client library but this will most likely not be compatible with the Codeigniter Library...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM