Search for Resources and Solutions

How to upgrade the Facebook Api from 3.2 or 3.3 to 4.0

I'm happy that is easy to upgrade the Facebook Api from 3.2 or 3.3 to 4.0 instead to get a new headache like was in may 2019. You just have to edit the version number in 3 files to upgrade the Facebook Api from 3.2 or 3.3 to 4.0.

First of all, open the file application/base/user/apps/collection/facebook_ads/main.php and for the constant MIDRUB_ADS_FACEBOOK_GRAPH_VERSION change the version from 3.3 to 4.0.

Then open the file application/base/user/networks/facebook_ad_labels.php and change the line 75(the key default_graph_version) from 3.3 to 4.0.

Then open the file vendor/facebook/php-ads-sdk/src/FacebookAds/ApiConfig.php and change the APIVersion from 3.3 to 4.0.

Afer this, in your Facebook Application from, go to Settings -> Advanced and change the Api version to 4.0.

This update is request by Facebook until november, isn't my fault.

In the next week i will release a new update for Midrub Facebook Ads Manager with some css fixes and a dropdown for filtering ads. 

Was this article helpful?