Our app installs apps (or "tabs") to our users' Facebook Business Pages. Our code has been running nicely for many years, but as is usually the case with Facebook, things break all the time. Because, well, Facebook.
Some of our recent installation attempts are now failing with an error message we've never seen before:
(#2069016) This page does not have permission to install custom tab
As far as Google is concerned, this Stack Overflow question will be the first instance of that particular error message on the internet... So, I don't know what to do.
Any thoughts on what could be wrong?
For reference the page access tokens we're using have the following scopes (verified just now):
user_friends, email, read_insights, publish_actions, manage_pages, pages_show_list, publish_pages, business_management, public_profile
According to the change log, this is a 90 day breaking change, https://developers.facebook.com/docs/graph-api/changelog/version2.11/#gapi-90-pages
/page/tabs
— Creating custom tabs with POST operations will only be available to Pages with 2000 or more fans, or pages managed by whitelisted apps. Existing custom tabs will be unaffected.
90 days in relation to the release of API v2.11, which was on November 7, 2017 - so you're starting to see the effects now.
This sounds as though the page tab add dialog was not affected (at least to me, I have not checked yet) - so presenting your app users with the dialog could allow them to easily install the app on their pages themselves, maybe give that a go. You can call it either via the JS SDK's FB.ui, or by redirecting the user to https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID &redirect_uri=YOUR_URL
https://developers.facebook.com/docs/pages/tabs#adding
As CBroe suggests, installing a page tab using the redirect method still works.
Edit: sadly they've closed this loophole too
The Page Tabs reference page states (emphasis added):
You can only create tabs on Pages that have 2000 or more fans, or if you are an app developer with Admin privileges on those Pages.
So, if you're in the fortunate situation in which you personally have admin access to the page (e.g. you created the page, the page owner granted you admin access, etc.), then you can still install apps even if it has fewer than 2000 fans.
I believe this exception is provided to enable developers to, well, develop apps (duh). However, this same ability allows us to install production apps to live pages.
Note: My experience with this workaround has been hit-and-miss. It always works for me, but it doesn't seem to work well for other devs at our company. I have a theory for why this seems to be the case. Experimentation suggests that there may be another requirement - it looks like you might also need to have admin privileges on the actual app (Page Tab) you're attempting to install.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With