diff --git a/includes/Social/Medium.php b/includes/Social/Medium.php index bef6e040..159eab42 100644 --- a/includes/Social/Medium.php +++ b/includes/Social/Medium.php @@ -181,7 +181,7 @@ public function get_image_url( $post ) { * @since 2.5.0 * @return array */ - public function remote_post($app_id, $app_secret, $app_access_token, $type, $ID, $post_id, $profile_key, $force_share = false, $medium_id) + public function remote_post($app_id, $app_secret, $app_access_token, $type, $ID, $post_id, $profile_key, $force_share = false, $medium_id = '') { // get share count $count_meta_key = '__wpsp_medium_share_count_'.$ID; @@ -236,7 +236,9 @@ public function remote_post($app_id, $app_secret, $app_access_token, $type, $ID, 'publish_date' => time(), ); $errorFlag = true; - }else { + }else if(!empty($response->errors[0]->message)){ + $response = $response->errors[0]->message; + }else { $errorFlag = false; $response = 'Something went wrong..'; } diff --git a/readme.txt b/readme.txt index dda38fe5..89ad882e 100644 --- a/readme.txt +++ b/readme.txt @@ -208,7 +208,7 @@ No, SchedulePress doesn’t require any additional plugin. All you have to do is == Changelog == -= 5.1.7 - 2024-10-07 = += 5.1.7 - 2024-10-08 = - Added: Support for Medium Social Share. - Improvement: Optimized database queries for better performance. - Few minor bug fixes & improvements.