I found this article which said to add a page/app to a Facebook Page you need to hit this URL with your two parameters:
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID &display=popup&next=YOUR_URL
Update: I was trying to add an ‘app’ rather than a ‘page tab’ and it turned out I needed this:
https://www.facebook.com/add.php?api_key=YOUR_APP_ID&pages