Changeset 1687901
- Timestamp:
- 06/29/2017 05:38:10 PM (9 years ago)
- Location:
- social-metrics-tracker
- Files:
-
- 107 added
- 4 edited
-
tags/1.6.8 (added)
-
tags/1.6.8/MetricsUpdater.class.php (added)
-
tags/1.6.8/SocialMetricsDebugger.class.php (added)
-
tags/1.6.8/SocialMetricsSettings.class.php (added)
-
tags/1.6.8/SocialMetricsTrackerWidget.class.php (added)
-
tags/1.6.8/css (added)
-
tags/1.6.8/css/social-metrics-tracker.min.css (added)
-
tags/1.6.8/css/social-metrics-tracker.min.css.map (added)
-
tags/1.6.8/css/social-metrics-tracker.scss (added)
-
tags/1.6.8/data-sources (added)
-
tags/1.6.8/data-sources/FacebookGraphUpdater.class.php (added)
-
tags/1.6.8/data-sources/FacebookPublicUpdater.class.php (added)
-
tags/1.6.8/data-sources/FlattrUpdater.class.php (added)
-
tags/1.6.8/data-sources/GooglePlusUpdater.class.php (added)
-
tags/1.6.8/data-sources/HTTPResourceUpdater.class.php (added)
-
tags/1.6.8/data-sources/LinkedInUpdater.class.php (added)
-
tags/1.6.8/data-sources/PinterestUpdater.class.php (added)
-
tags/1.6.8/data-sources/RedditUpdater.class.php (added)
-
tags/1.6.8/data-sources/StumbleUponUpdater.class.php (added)
-
tags/1.6.8/data-sources/WordPressCircuitBreaker.class.php (added)
-
tags/1.6.8/data-sources/XingUpdater.class.php (added)
-
tags/1.6.8/data-sources/google_analytics.php (added)
-
tags/1.6.8/js (added)
-
tags/1.6.8/js/social-metrics-tracker.js (added)
-
tags/1.6.8/js/social-metrics-tracker.min.js (added)
-
tags/1.6.8/lib (added)
-
tags/1.6.8/lib/Google (added)
-
tags/1.6.8/lib/Google/Auth (added)
-
tags/1.6.8/lib/Google/Auth/Abstract.php (added)
-
tags/1.6.8/lib/Google/Auth/AssertionCredentials.php (added)
-
tags/1.6.8/lib/Google/Auth/Exception.php (added)
-
tags/1.6.8/lib/Google/Auth/LoginTicket.php (added)
-
tags/1.6.8/lib/Google/Auth/OAuth2.php (added)
-
tags/1.6.8/lib/Google/Auth/Simple.php (added)
-
tags/1.6.8/lib/Google/Cache (added)
-
tags/1.6.8/lib/Google/Cache/Abstract.php (added)
-
tags/1.6.8/lib/Google/Cache/Apc.php (added)
-
tags/1.6.8/lib/Google/Cache/Exception.php (added)
-
tags/1.6.8/lib/Google/Cache/File.php (added)
-
tags/1.6.8/lib/Google/Cache/Memcache.php (added)
-
tags/1.6.8/lib/Google/Cache/Null.php (added)
-
tags/1.6.8/lib/Google/Client.php (added)
-
tags/1.6.8/lib/Google/Collection.php (added)
-
tags/1.6.8/lib/Google/Config.php (added)
-
tags/1.6.8/lib/Google/Exception.php (added)
-
tags/1.6.8/lib/Google/Http (added)
-
tags/1.6.8/lib/Google/Http/Batch.php (added)
-
tags/1.6.8/lib/Google/Http/CacheParser.php (added)
-
tags/1.6.8/lib/Google/Http/MediaFileUpload.php (added)
-
tags/1.6.8/lib/Google/Http/REST.php (added)
-
tags/1.6.8/lib/Google/Http/Request.php (added)
-
tags/1.6.8/lib/Google/IO (added)
-
tags/1.6.8/lib/Google/IO/Abstract.php (added)
-
tags/1.6.8/lib/Google/IO/Curl.php (added)
-
tags/1.6.8/lib/Google/IO/Exception.php (added)
-
tags/1.6.8/lib/Google/IO/Stream.php (added)
-
tags/1.6.8/lib/Google/IO/cacerts.pem (added)
-
tags/1.6.8/lib/Google/Model.php (added)
-
tags/1.6.8/lib/Google/Service (added)
-
tags/1.6.8/lib/Google/Service.php (added)
-
tags/1.6.8/lib/Google/Service/Analytics.php (added)
-
tags/1.6.8/lib/Google/Service/Exception.php (added)
-
tags/1.6.8/lib/Google/Service/Resource.php (added)
-
tags/1.6.8/lib/Google/Signer (added)
-
tags/1.6.8/lib/Google/Signer/Abstract.php (added)
-
tags/1.6.8/lib/Google/Signer/P12.php (added)
-
tags/1.6.8/lib/Google/Utils (added)
-
tags/1.6.8/lib/Google/Utils.php (added)
-
tags/1.6.8/lib/Google/Utils/URITemplate.php (added)
-
tags/1.6.8/lib/Google/Verifier (added)
-
tags/1.6.8/lib/Google/Verifier/Abstract.php (added)
-
tags/1.6.8/lib/Google/Verifier/Pem.php (added)
-
tags/1.6.8/lib/Handlebars (added)
-
tags/1.6.8/lib/Handlebars/Autoloader.php (added)
-
tags/1.6.8/lib/Handlebars/Cache (added)
-
tags/1.6.8/lib/Handlebars/Cache.php (added)
-
tags/1.6.8/lib/Handlebars/Cache/APC.php (added)
-
tags/1.6.8/lib/Handlebars/Cache/Disk.php (added)
-
tags/1.6.8/lib/Handlebars/Cache/Dummy.php (added)
-
tags/1.6.8/lib/Handlebars/Context.php (added)
-
tags/1.6.8/lib/Handlebars/Engine.php (added)
-
tags/1.6.8/lib/Handlebars/Helpers.php (added)
-
tags/1.6.8/lib/Handlebars/Loader (added)
-
tags/1.6.8/lib/Handlebars/Loader.php (added)
-
tags/1.6.8/lib/Handlebars/Loader/FilesystemLoader.php (added)
-
tags/1.6.8/lib/Handlebars/Loader/StringLoader.php (added)
-
tags/1.6.8/lib/Handlebars/Parser.php (added)
-
tags/1.6.8/lib/Handlebars/String.php (added)
-
tags/1.6.8/lib/Handlebars/Template.php (added)
-
tags/1.6.8/lib/Handlebars/Tokenizer.php (added)
-
tags/1.6.8/lib/class-wp-list-table.php (added)
-
tags/1.6.8/lib/wp-settings-framework.php (added)
-
tags/1.6.8/readme.txt (added)
-
tags/1.6.8/settings (added)
-
tags/1.6.8/settings/smt-gapi.php (added)
-
tags/1.6.8/settings/smt-general.php (added)
-
tags/1.6.8/smt-dashboard-debug.php (added)
-
tags/1.6.8/smt-dashboard.php (added)
-
tags/1.6.8/smt-export.php (added)
-
tags/1.6.8/social-metrics-tracker.php (added)
-
tags/1.6.8/templates (added)
-
tags/1.6.8/templates/settings-connections.handlebars (added)
-
tags/1.6.8/templates/settings-nav.handlebars (added)
-
tags/1.6.8/templates/settings-test.handlebars (added)
-
tags/1.6.8/templates/settings-urls.handlebars (added)
-
tags/1.6.8/templates/stat-details.handlebars (added)
-
tags/1.6.8/uninstall.php (added)
-
trunk/MetricsUpdater.class.php (modified) (1 diff)
-
trunk/data-sources/FacebookGraphUpdater.class.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/social-metrics-tracker.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
social-metrics-tracker/trunk/MetricsUpdater.class.php
r1466646 r1687901 787 787 788 788 $total['count']++; 789 $total['socialscore'] += $socialcount_TOTAL;790 $total['views'] += $ga_pageviews;791 $total['comments'] += $post->comment_count;789 $total['socialscore'] += intval($socialcount_TOTAL); 790 $total['views'] += intval($ga_pageviews); 791 $total['comments'] += intval($post->comment_count); 792 792 793 793 } -
social-metrics-tracker/trunk/data-sources/FacebookGraphUpdater.class.php
r1202486 r1687901 13 13 public $enabled_by_default = true; 14 14 15 private $uri = 'https://graph.facebook.com/v2. 3';15 private $uri = 'https://graph.facebook.com/v2.9'; 16 16 17 17 public function __construct($access_token=false) { … … 34 34 if (strlen($app_id) == 0 || strlen($app_secret) == 0) return false; 35 35 36 $oauth_uri = "https://graph.facebook.com/v2. 3/oauth/access_token?client_id=$app_id&client_secret=$app_secret&grant_type=client_credentials";36 $oauth_uri = "https://graph.facebook.com/v2.9/oauth/access_token?client_id=$app_id&client_secret=$app_secret&grant_type=client_credentials"; 37 37 38 38 $response = wp_remote_get($oauth_uri); … … 57 57 $this->updater->resource_params = array( 58 58 'id' => $url, 59 'fields' => ' og_object{engagement}'59 'fields' => 'engagement' 60 60 ); 61 61 … … 66 66 67 67 // Note: The final encoded URL should look a bit like this: 68 // https://graph.facebook.com/v2. 3/?id=http://www.wordpress.org&fields=og_object{engagement}&access_token=TOKEN_HERE68 // https://graph.facebook.com/v2.9/?id=http://www.wordpress.org&fields=engagement&access_token=TOKEN_HERE 69 69 } 70 70 … … 83 83 // Validation 84 84 if (!is_array($this->updater->data)) return 0; 85 if (!isset($this->updater->data[' og_object'])) return 0;86 if (!isset($this->updater->data['og_object']['engagement'])) return 0; 87 if (!isset($this->updater->data['og_object']['engagement']['count'])) return 0;85 if (!isset($this->updater->data['engagement'])) return 0; 86 87 $engagement = $this->updater->data['engagement']; 88 88 89 89 // Return count 90 return intval($this->updater->data['og_object']['engagement']['count']); 90 return ( 91 intval($engagement['reaction_count']) + 92 intval($engagement['comment_count']) + 93 intval($engagement['share_count']) + 94 intval($engagement['comment_plugin_count']) 95 ); 91 96 } 92 97 -
social-metrics-tracker/trunk/readme.txt
r1466646 r1687901 4 4 Tags: admin, dashboard, social, social media, facebook, twitter, metrics, analytics, tracking, stats, engagement, share, sharing, shares, likes, tweets 5 5 Requires at least: 3.5 6 Tested up to: 4. 5.37 Stable tag: 1.6. 76 Tested up to: 4.8 7 Stable tag: 1.6.8 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 108 108 109 109 == Changelog == 110 111 = 1.6.8 = 112 * Update Facebook Graph API version to 2.9 110 113 111 114 = 1.6.7 = … … 257 260 == Upgrade Notice == 258 261 262 = 1.6.8 = 263 * Update Facebook Graph API version to 2.9 264 259 265 = 1.6.7 = 260 266 Fixed a bug with the Facebook Public data -
social-metrics-tracker/trunk/social-metrics-tracker.php
r1466646 r1687901 4 4 Plugin URI: https://github.com/bcole808/wp-social-metrics-tracker 5 5 Description: Collect and display social network shares, likes, tweets, and view counts of posts. 6 Version: 1.6. 76 Version: 1.6.8 7 7 Author: Ben Cole 8 8 Author URI: http://www.bencole.net … … 39 39 class SocialMetricsTracker { 40 40 41 public $version = '1.6. 7'; // for db upgrade comparison41 public $version = '1.6.8'; // for db upgrade comparison 42 42 public $updater; 43 43 public $options;
Note: See TracChangeset
for help on using the changeset viewer.