Plugin Directory

Changeset 1064280


Ignore:
Timestamp:
01/10/2015 12:06:37 AM (11 years ago)
Author:
bcole808
Message:

Release of v1.3.4

Location:
social-metrics-tracker
Files:
118 added
3 edited

Legend:

Unmodified
Added
Removed
  • social-metrics-tracker/trunk/data-sources/FacebookUpdater.class.php

    r1026007 r1064280  
    1111    public $name  = 'Facebook';
    1212
    13     private $uri = 'https://api.facebook.com/method/links.getStats';
     13    private $uri = 'https://graph.facebook.com/2.0/fql';
    1414
    1515    public function __construct() {
     
    2020        parent::setparams($post_id, $post_url);
    2121
     22        $url = $this->updater->post_url;
     23
    2224        $this->updater->resource_params = array(
    23             'format' => 'json',
    24             'urls' => $this->updater->post_url
     25            // This FQL query will be URL encoded by http_build_query()
     26            'q' => "SELECT url, share_count, like_count, comment_count, total_count, click_count FROM link_stat where url='$url'"
    2527        );
    2628    }
     
    3234        $updater->meta = array();
    3335        $updater->meta[$this->updater->meta_prefix.$this->updater->slug] = $this->get_total();
    34         $updater->meta['facebook_comments']    = $updater->data[0]['comment_count'];
    35         $updater->meta['facebook_shares']      = $updater->data[0]['share_count'];
    36         $updater->meta['facebook_likes']       = $updater->data[0]['like_count'];
     36        $updater->meta['facebook_comments']    = $updater->data['data'][0]['comment_count'];
     37        $updater->meta['facebook_shares']      = $updater->data['data'][0]['share_count'];
     38        $updater->meta['facebook_likes']       = $updater->data['data'][0]['like_count'];
    3739    }
    3840
    3941    public function get_total() {
    40         return ($this->updater->data === null) ? 0 : $this->updater->data[0]['total_count'];
     42        return ($this->updater->data === null) ? 0 : $this->updater->data['data'][0]['total_count'];
    4143    }
    4244
  • social-metrics-tracker/trunk/readme.txt

    r1032108 r1064280  
    22Contributors: bcole808
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K2Z4QFWKJ5DM4
    4 Tags: admin, dashboard, social, social media, facebook, twitter, metrics, analytics, tracking, engagement, share, sharing, shares
     4Tags: admin, dashboard, social, social media, facebook, twitter, metrics, analytics, tracking, stats, engagement, share, sharing, shares, likes, tweets
    55Requires at least: 3.5
    6 Tested up to: 4.0
    7 Stable tag: 1.3.3
     6Tested up to: 4.1
     7Stable tag: 1.3.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Collects social data and shows you which of your posts are most popular based on how many times each post has been shared on various social networks.
     11Collects social data and shows you which posts are most popular based on post shares across popular social networks.
    1212
    1313
     
    37371. Install and activate the WordPress plugin.
    38382. Data will automatically begin syncing. This will take some time.
    39 3. Review the plugin settings under Settings > Social Metrics
     393. Review the plugin settings under Social Metrics > Settings
    4040
    4141If you do not see any statistics on the Social Metrics dashboard, make sure that you have some posts published and that wp-cron.php is working correctly. This plugin relies on the WordPress Cron system to fetch data updates. This plugin will not work on local or development servers where URLs are not publicly accessible.
     
    8484
    8585== Changelog ==
     86
     87= 1.3.4 =
     88* Update plugin to use Facebook API v2.0
     89* Removed "Development server notice" for some configurations
     90* IMPORTANT: As of April 30, 2015, versions of this plugin below 1.3.4 will fail to collect data from Facebook; update to this version before then.
    8691
    8792= 1.3.3 =
     
    149154== Upgrade Notice ==
    150155
     156= 1.3.4 =
     157Important update to the Facebook API
     158
    151159= 1.3.3 =
    152160Optimize pagination on reporting dashboard
  • social-metrics-tracker/trunk/social-metrics-tracker.php

    r1032108 r1064280  
    44Plugin URI: https://github.com/ChapmanU/wp-social-metrics-tracker
    55Description: Collect and display social network shares, likes, tweets, and view counts of posts.
    6 Version: 1.3.3
     6Version: 1.3.4
    77Author: Ben Cole, Chapman University
    88Author URI: http://www.bencole.net
     
    3535class SocialMetricsTracker {
    3636
    37     public $version = '1.3.3'; // for db upgrade comparison
     37    public $version = '1.3.4'; // for db upgrade comparison
    3838    public $updater;
    3939    public $options;
     
    9696    // Determines if we are on a development or staging environment
    9797    public function is_development_server() {
    98         return ((defined('WP_ENV') && strtolower(WP_ENV) != 'production') || (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == '127.0.0.1'));
     98        return (defined('WP_ENV') && strtolower(WP_ENV) != 'production');
    9999    }
    100100
     
    108108        }
    109109
    110         $message = '<h3 style="margin-top:0;">Social Metrics data syncing is disabled</h3> You are on a development server; Social Network share data cannot be retrieved for private development URLs. <ul>';
    111 
    112         if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') {
    113             $message .= "<li>The server IP address appears to be set to 127.0.0.1 which is a local address. </li>";
    114         }
    115 
    116         if (defined('WP_ENV') && strtolower(WP_ENV) != 'production') {
    117             $message .= "<li>The PHP constant <b>WP_ENV</b> must be set to <b>production</b> or be undefined. WP_ENV is currently set to: <b>".WP_ENV."</b>. </li>";
    118         }
    119 
    120         $message .= '</ul>';
     110        $message = '<h3 style="margin-top:0;">Social Metrics data syncing is disabled</h3> You are on a development server; Social Network share data cannot be retrieved for private development URLs. ';
     111
     112        $message .= "<ul><li>The PHP constant <b>WP_ENV</b> must be set to <b>production</b> or be undefined. WP_ENV is currently set to: <b>".WP_ENV."</b>. </li></ul>";
    121113
    122114        printf( '<div class="error"> <p> %s </p> </div>', $message);
Note: See TracChangeset for help on using the changeset viewer.