You are here

public static function ShareaholicShareCount::get_services_config in Share Buttons, Related Posts, Content Analytics - Shareaholic 7.3

Same name and namespace in other branches
  1. 8 lib/social-share-counts/share_count.php \ShareaholicShareCount::get_services_config()
2 calls to ShareaholicShareCount::get_services_config()
ShareaholicCurlMultiShareCount::get_counts in lib/social-share-counts/curl_multi_share_count.php
This function should get all the counts for the supported services
ShareaholicSeqShareCount::get_counts in lib/social-share-counts/seq_share_count.php
This function should get all the counts for the supported services

File

lib/social-share-counts/share_count.php, line 34

Class

ShareaholicShareCount
An abstract class Share Counts to be extended

Code

public static function get_services_config() {
  return array(
    'facebook' => array(
      'url' => 'https://graph.facebook.com/?fields=og_object{engagement{count}}&id=%s',
      'method' => 'GET',
      'timeout' => 3,
      // in number of seconds
      'callback' => 'facebook_count_callback',
    ),
    'pinterest' => array(
      'url' => 'https://api.pinterest.com/v1/urls/count.json?url=%s&callback=f',
      'method' => 'GET',
      'timeout' => 3,
      'callback' => 'pinterest_count_callback',
    ),
    'buffer' => array(
      'url' => 'https://api.bufferapp.com/1/links/shares.json?url=%s',
      'method' => 'GET',
      'timeout' => 1,
      'callback' => 'buffer_count_callback',
    ),
    'reddit' => array(
      'url' => 'https://www.reddit.com/button_info.json?url=%s',
      'method' => 'GET',
      'timeout' => 1,
      'callback' => 'reddit_count_callback',
    ),
    'vk' => array(
      'url' => 'https://vk.com/share.php?act=count&url=%s',
      'method' => 'GET',
      'timeout' => 1,
      'callback' => 'vk_count_callback',
    ),
    'tumblr' => array(
      'url' => 'https://api.tumblr.com/v2/share/stats?url=%s',
      'method' => 'GET',
      'timeout' => 1,
      'callback' => 'tumblr_count_callback',
    ),
    'odnoklassniki' => array(
      'url' => 'https://connect.ok.ru/dk?st.cmd=extLike&uid=odklcnt0&ref=%s',
      'method' => 'GET',
      'timeout' => 1,
      'callback' => 'odnoklassniki_count_callback',
    ),
    'fancy' => array(
      'url' => 'https://fancy.com/fancyit/count?ItemURL=%s',
      'method' => 'GET',
      'timeout' => 1,
      'callback' => 'fancy_count_callback',
    ),
    'yummly' => array(
      'url' => 'https://www.yummly.com/services/yum-count?url=%s',
      'method' => 'GET',
      'timeout' => 1,
      'callback' => 'yummly_count_callback',
    ),
  );
}