Skip to content

Commit

Permalink
Merge pull request #1004 from Codeinwp/feat/1003
Browse files Browse the repository at this point in the history
Upgrade facebook graph api version
  • Loading branch information
vytisbulkevicius authored Aug 28, 2024
2 parents 359bc37 + 667a4c5 commit 5bf3b54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/admin/services/class-rop-facebook-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => 'v16.0',
'default_graph_version' => 'v20.0',
)
);
} catch ( Exception $exception ) {
Expand Down Expand Up @@ -761,9 +761,9 @@ private function try_post( $new_post, $page_id, $token, $post_id, $posting_type
$post_data['access_token'] = $token;

if ( 'video' === $posting_type ) {
$url = 'https://graph-video.facebook.com/v12.0' . $path;
$url = 'https://graph-video.facebook.com/v20.0' . $path;
} else {
$url = 'https://graph.facebook.com/v12.0' . $path;
$url = 'https://graph.facebook.com/v20.0' . $path;
}

// Scrape post URL before sharing
Expand Down

0 comments on commit 5bf3b54

Please sign in to comment.