Social Networks Auto Poster (SNAP) API

Product Info
This products is for: Plain PHP, WordPress
Compatible with: Your own PHP Projects, WordPress

Social Networks Auto Poster (SNAP) API is a universal API for the most popular social networks. SNAP API gives you an ability to make a beautifully formatted posts to the most popular social networks and CMS platforms by one simple call.

SNAP Networks

Why do we need that?

Universal API

Each social network and each CMS platform has it’s own API that different from one another. Right now you need to read through tons of specifications and documentation, learn how to make calls and sign or encode your requests for each network. That could take weeks and months of development time. Then when it’s done and it’s still not working, you will need to comb through forums, discussion groups, newsgroups, stackoverflow, etc. trying to figure out what you have done wrong. That will take even more time.

Well, we already done all that. We took every available API, learned how to work with it and as the result we combined then all in one universal package. You just make one simple API call and SNAP will post your message everywhere.

We actually did even more

API for the platforms without built-in API

There are some networks that don’t have a publicly available API. We created our own APIs for such networks.

Supported Platforms and Social Networks

1. Platforms/Social Networks based on the unique NextScripts API:
 1. Blogger/Blogspot - Post to your Blog. HTML is supported.
 2. Deviantart.com - Post to your blog. HTML is supported.
 3. Flipboard - Post to your magazine.
 4. Google+ - Post to your profile, business page or community. Ability to attach a link to Google+ post. Ability to make "Image" posts.
 5. Instagram - Unique ability to Post to Instagram account
 6. LinkedIn - Unique ability to Post to LinkedIn Company pages
 7. Pinterest - Pin your blogpost's featured image to your Pinterest board.
 8. Reddit - post to your subreddits.
 9. vBulletin - Auto-submit your blogpost to vBulletin forums. Could create new threads or new posts.
 10. vKontakte(VK.com) - Post to your profile or group page. Ability to attach link to vk.com post. Ability to make "Image" posts.
11. YouTube - Post messages to your YouTube channel feed. Ability to attach existing YouTube videos to posts.

2. Platforms/Social Networks based on the built-in APIs:
 1. App.net - Post to your account.
 2. Delicious - Post bookmark to your account.
 3. Diigo - Post bookmark to your account.
 4. Facebook - Post to your profile, business page, community page, or Facebook group page. Ability to attach your blogpost to Facebook post. Ability to make "Image" posts.
 5. Flickr - Post images to your photostream and/or sets. Tags are supported.
 6. Instapaper - Auto-submit bookmark to your account.
 7. LinkedIn - Post to your account. Ability to attach a link to LinkedIn post.
 8. LiveJournal - Post to LiveJournal blog or community. "LiveJournal Engine" based website DreamWidth.org is also supported.
 9. Medium - Post to Medium profile or publication.
10. ok.ru (Odnoklassniki) - Autopost to your group/page. Ability to make text posts, image posts, share links.
11. Scoop.It - Post to your "Topics". Ability to attach a link to the scoop. Ability to make "Image" posts.
12. Stumbleupon - Post bookmark to your account.
13. Tumblr - Post to your account. Ability to attach a link to Tumblr post. HTML is supported.
14. Twitter - Post to your account. Ability to attach Image to tweets.
15. Plurk - Post to your account. Ability to attach Image to messages.
16. Weibo - You can post your messages and images.
17. WordPress - Post to blog based on WordPress. This options includes standalone blogs as well as, WordPress.com, Blog.com, etc..
18. XING - Post text messages or share links to your account.
19. Yo - Send Yo Notifications to your users

Requirements

PHP Ver > 5.2
curlSSL
PHP should have at least 32M of memory (64M and more is highly recommended).

X

Get it

  • SNAP API Run-TimeEmbedded libraries

    $49
    /yr

    Embedded libraries – Will work only from WordPress.
    SNAP API Run-Time is not downloadable
    It is available only as part of SNAP Pro Plugin for WordPress and other integrated solutions.

    Get it now:
  • SNAP API ProFull Source API Libraries with management panel

    $99
    /yr

    (available as beta)
    Full Source API Libraries with management panel.

    *** Special Offer: Get “SNAP Pro Plugin for WordPress” free with “SNAP API Pro” purchase.

    Get it now:
  • SNAP API LightFull Source API Libraries

    $75
    /yr

    (available as beta)
    Only API libraries, no management panel

    *** Special Offer: Get “SNAP Pro Plugin for WordPress” free with “SNAP API Light” purchase.

    Get it now:
By ordering the software, you specify that you agree to the Nextscripts Software License/Terms of Use and SNAP API Subscription Terms
Have some questions?

Please check the SNAP API FAQ or feel free to contact us.

Main Question: Can this product read my posts from my database? Can this product save/read my settings from my database? Can it post to multiple accounts simultaneously? Can I set the delay? Can I set a schedule to automatically repost my messages?

This product is an API. Simply API is a “black box” that you provide with the destination, credentials and message. API will post this message to your destination using your credentials. That’s it, nothing more, nothing less.

You can call it as many times as you like with different destination and credentials ad it will post to different accounts or pages. It’s up you if you would like to save login or not and where you do that. It doesn’t read your messages from the DB, it does not schedule posts or re-posts, it does not do any other functionality. API is a library that you can wrap your own code around.

Our WordPress plugin is a very good example of kind of code could be written around the API.

Terms FAQ
Our licenses are issued on “Per User” basis. It means you can use one license on all your sites, but you can’t give it to other people. You can use Plugin and API libraries on all your sites/blogs, the only requirement is that all those sites/blogs must be yours. You can’t re-sell or re-distribute the “Pro” Plugin and API libraries, as well as scripts or websites with per-installed “Pro” Plugin and/or API libraries, neither you can’t install plugin and API libraries for your clients.

If you are interested in re-selling plugin or would like to install it for your clients you can look at our affiliate program (http://www.nextscripts.com/affiliates/) or developers/resell packages: (http://www.nextscripts.com/developer-and-resale-licenses/)

How to use it

1. Post simple text message to all your configured accounts:

<?php        
  // First, let's get settings. 
  $fileData = file_get_contents(dirname(__FILE__).'/nx-snap-settings.txt');  
  $snapOptions = maybe_unserialize($fileData);
  
  if (class_exists("cl_nxsAutoPostToSN")) { 
    // Initialize the class
    $nxsAutoPostToSN = new cl_nxsAutoPostToSN($snapOptions);    
    // Message array contains the post
    $message = array(
      'title'=>'Social Networks Auto Poster (SNAP) API', 
      'text'=>'Social Networks Auto Poster (SNAP) API is
         a universal API for the most popular social networks', 
    );  
    // Set message 
    $nxsAutoPostToSN->setMessage($message);
    // Make the post
    $ret = $nxsAutoPostToSN->autoPost(); 
  }
?>

2. Post a text message with attached link and specific image ONLY to the first and third Twitter accounts and to the first Facebook account:

<?php        
  // First, let's get settings. 
  $fileData = file_get_contents(dirname(__FILE__).'/nx-snap-settings.txt');  
  $snapOptions = maybe_unserialize($fileData);
  $postOnlyTo = array('tw'=>array(0, 2), 'fb'=>array(0));
  
  if (class_exists("cl_nxsAutoPostToSN")) { 
    // Initialize the class
    $nxsAutoPostToSN = new cl_nxsAutoPostToSN($snapOptions, $postOnlyTo);
    // Message array contains the post
    $message = array(
      'url'=>'http://www.nextscripts.com/snap-api/',
      'urlDescr'=>'Social Networks Auto Poster (SNAP) API', 
      'urlTitle'=>'Social Networks Auto Poster API', 
      'imageURL' => array(
        'large'=>'http://www.nextscripts.com/images/SNAP-Logo_Big_SQ.png'
      ), 
      'title'=>'Social Networks Auto Poster (SNAP) API', 
      'text'=>'Social Networks Auto Poster (SNAP) API is
         a universal API for the most popular social networks', 
    );  
    // Set message 
    $nxsAutoPostToSN->setMessage($message);
    // Make the post
    $ret = $nxsAutoPostToSN->autoPost(); 
  }
?>

3. You can also just post directly to individual networks. You can do it even without settings array. Here is the example of how to post a simple message to your Google Plus Business Page Stream: (more examples of using it with Google+ only are here Google+ Automated Posting)

<?php        
  require_once "nxs-api/nxs-api.php";
  require_once "nxs-api/nxs-http.php";
  require_once "inc/nxs-functions.php";  

  $email = 'YourEmail@gmail.com'; 
  $pass = 'YourPassword';
  $pageID = '109888164682746252347';
  $msg = 'Post this to Google Plus!'; 

  $nt = new nxsAPI_GP();
  $loginError = $nt->connect($email, $pass);     
  if (!$loginError)
    {
      $result = $nt -> postGP($msg, '', $pageID);
    } 
  else echo $loginError; 
  
  if (!empty($result) && is_array($result) && !empty($result['post_url'])) 
    echo '<a target="_blank" href="'.$result['post_url'].'">New Post</a>'; 
  else 
    echo "<pre>".print_r($result, true)."</pre>";
?>

Here is how to post to Twitter:

<?php        
  require_once "nxs-api/nxs-http.php";
  require_once "inc/nxs-functions.php";  

  require_once "inc-cl/tw.api.php"; 

  $message = array();
  $message['text'] = 'Test Post';
  $message['imageURL'] = 'http://www.nextscripts.com/imgs/nextscripts.png';

  $TWoptions = array();

  $TWoptions['twURL'] = 'https://twitter.com/YourTWPage';
  $TWoptions['twConsKey'] = 'KEY';
  $TWoptions['twConsSec'] = 'SEC';
  $TWoptions['twAccToken'] = 'TTT-TOK';
  $TWoptions['twAccTokenSec'] = 'TOKSEC';
  $TWoptions['twMsgFormat'] = '%TEXT%';
  $TWoptions['attchImg'] = '1';


  $ntToPost = new nxs_class_SNAP_TW(); 
  $result = $ntToPost->doPostToNT($TWoptions, $message);   
  
  if (!empty($result) && is_array($result) && !empty($result['postURL'])) 
    echo '<a target="_blank" href="'.$result['postURL'].'">New Post</a>'; 
  else 
    echo "<pre>".print_r($result, true)."</pre>";
?>

Here is how to post to Facebook:

<?php        
  require_once "nxs-api/nxs-http.php";
  require_once "inc/nxs-functions.php";  

  require_once "inc-cl/fb.api.php"; 

  $message = array();
  $message['text'] = 'Test Post';
  $message['imageURL'] = 'http://www.nextscripts.com/imgs/nextscripts.png';
  $message['url'] = 'http://www.nextscripts.com/snap-features/assign-categories-to-each-social-network/';

  $NToptions = array();

  $NToptions['fbURL'] = 'https://www.facebook.com/MYFBPAGE';
  $NToptions['fbAppID'] = 'APPID';
  $NToptions['fbAppSec'] = 'SEC';
  $NToptions['fbAppAuthToken'] = 'user_token';
  $NToptions['fbAppPageAuthToken'] = 'page_token';
  $NToptions['postType'] = 'A';

  $ntToPost = new nxs_class_SNAP_FB(); 
  $result = $ntToPost->doPostToNT($NToptions, $message);   
  
  if (!empty($result) && is_array($result) && !empty($result['postURL'])) 
    echo '<a target="_blank" href="'.$result['postURL'].'">New Post</a>'; 
  else 
    echo "<pre>".print_r($result, true)."</pre>";
?>

Management Panel Screenshots

General View:
Management panel

Account Details View:
Management panel Details

© 2012-2016 NextScripts.com