Skip to content

Commit

Permalink
Set latest graph api version
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Aug 22, 2024
1 parent 5bc460d commit 667a4c5
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/v16.0' . $path;
$url = 'https://graph-video.facebook.com/v20.0' . $path;
} else {
$url = 'https://graph.facebook.com/v16.0' . $path;
$url = 'https://graph.facebook.com/v20.0' . $path;
}

// Scrape post URL before sharing
Expand Down

0 comments on commit 667a4c5

Please sign in to comment.