Google Plus Automated Posting from wordpress |
Google Plus Automated Posting from Wordpress
You have a site or weblog & you already posting your updates to Facebook & Twitter, but what about Google And? Users of the most recent Social Network aiming to be on the top are still lacking information about your updates. Google And API is still read only, so there were no way to sync your updates around all networks including Google And. Now it is. Google And Automated Posting script from Next Scripts can automatically submitting posts from your site directly to your Google And account.Also receive a WordPress Plugin that will automatically publish all of your posts to Google And
The script is very easy to use.
Examples:
1. Post simple message to your Google Plus Stream:
- <?php
- require "postToGooglePlus.php";
- $email = 'YourEmail@gmail.com';
- $pass = 'YourPassword';
- $msg = 'Post this to Google Plus!';
- $pageID = '104935301886129712427';
- $connectID = getUqID();
- $loginError = doConnectToGooglePlus($connectID, $email, $pass);
- if (!$loginError)
- {
- doPostToGooglePlus($connectID, $msg, '', $pageID);
- } else echo $loginError;
- ?>
- <?php
- require "postToGooglePlus.php";
- $email = 'YourEmail@gmail.com';
- $pass = 'YourPassword';
- $msg = 'Post this to Google Plus!';
- $pageID = '104935301886129712427';
- $connectID = getUqID();
- $loginError = doConnectToGooglePlus($connectID, $email, $pass);
- if (!$loginError)
- {
- $lnk = doGetGoogleUrlInfo($connectID, 'http://www.nextscripts.com/');
- doPostToGooglePlus($connectID, $msg, $lnk, $pageID);
- } else echo $loginError;
- ?>
3. Import RSS to Google Plus!
- <?php
- require "postToGooglePlus.php";
- $email = 'YourEmail@gmail.com';
- $pass = 'YourPassword';
- $url = 'http://www.YorWebSite.com/rss.xml';
- $connectID = getUqID();
- $loginError = doConnectToGooglePlus($connectID, $email, $pass);
- if (!$loginError)
- {
- $doc = new DOMdocument();
- $doc->load($url);
- $rss_array = array();
- $items = array();
- $tag = 'item';
- foreach($doc->getElementsByTagName($tag) AS $node)
- {
- $link = $node->getElementsByTagName('link')->item(0)->nodeValue;
- $title = $node->getElementsByTagName('title')->item(0)->nodeValue;
- $msg = '<a href="'.$link.'">'.$title.'</a><br/>';
- $msg .= $node->getElementsByTagName('description')->item(0)->nodeValue;
- doPostToGooglePlus($connectID, $msg);
- }
- } else echo $loginError;
- ?>
No comments:
Post a Comment