From 3b07504c6fddf40b7260782977ca157524aa3baf Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Wed, 29 May 2024 12:01:47 +0300 Subject: [PATCH 1/2] fix: update facebook graph version --- includes/admin/services/class-rop-facebook-service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/services/class-rop-facebook-service.php b/includes/admin/services/class-rop-facebook-service.php index 2c038d65a..81aeece15 100644 --- a/includes/admin/services/class-rop-facebook-service.php +++ b/includes/admin/services/class-rop-facebook-service.php @@ -163,7 +163,7 @@ public function set_api( $app_id = '', $secret = '' ) { array( 'app_id' => $this->strip_whitespace( $app_id ), 'app_secret' => $this->strip_whitespace( $secret ), - 'default_graph_version' => 'v12.0', + 'default_graph_version' => 'v16.0', ) ); } catch ( Exception $exception ) { From 61699a684adcee814dbe653ca701365718a1b246 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Tue, 4 Jun 2024 11:41:18 +0300 Subject: [PATCH 2/2] fix: update linkedin API version --- .../admin/services/class-rop-linkedin-service.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/admin/services/class-rop-linkedin-service.php b/includes/admin/services/class-rop-linkedin-service.php index 190cff7ba..e2e9d0e98 100644 --- a/includes/admin/services/class-rop-linkedin-service.php +++ b/includes/admin/services/class-rop-linkedin-service.php @@ -20,6 +20,13 @@ */ class Rop_Linkedin_Service extends Rop_Services_Abstract { + /** + * The version of the Linkedin API. + * + * @see https://learn.microsoft.com/en-us/linkedin/marketing/versioning?view=li-lms-2024-05 + */ + public const LINKEDIN_VERSION = 202405; + /** * An instance of authenticated LinkedIn user. * @@ -573,7 +580,7 @@ public function share( $post_details, $args = array() ) { 'x-li-format' => 'json', 'X-Restli-Protocol-Version' => '2.0.0', 'Authorization' => 'Bearer ' . $token, - 'Linkedin-Version' => defined( 'ROP_LINKEDIN_VERSION' ) ? ROP_LINKEDIN_VERSION : 202304, + 'Linkedin-Version' => defined( 'ROP_LINKEDIN_VERSION' ) ? ROP_LINKEDIN_VERSION : self::LINKEDIN_VERSION, ), ) ); @@ -971,7 +978,7 @@ private function linkedin_upload_assets( $image_url, $args, $token ) { 'x-li-format' => 'json', 'X-Restli-Protocol-Version' => '2.0.0', 'Authorization' => 'Bearer ' . $token, - 'Linkedin-Version' => defined( 'ROP_LINKEDIN_VERSION' ) ? ROP_LINKEDIN_VERSION : 202304, + 'Linkedin-Version' => defined( 'ROP_LINKEDIN_VERSION' ) ? ROP_LINKEDIN_VERSION : self::LINKEDIN_VERSION, ), ) );