Skip to content
David Lanier edited this page Feb 19, 2015 · 5 revisions
  1. Create new app at https://developers.facebook.com/
  2. Create test apps (localdev, dev, test).
    • These each have unique app IDs, so use some conditional code in settings.php or custom module to switch automatically based on environment.
  3. Set a contact email.
  4. Before launch, go to "Status & Review", set the big Yes/No slider to "Yes". (It will say "Do you want to make this app and all its live features available to the general public?")

Sample environment switching code:

<?php
if (isset($_SERVER['PANTHEON_ENVIRONMENT'])) {
  // Only on live web environment.
  if ($_SERVER['PANTHEON_ENVIRONMENT'] == 'live') {
    $app_id = '555555555555555';
  }
  if ($_SERVER['PANTHEON_ENVIRONMENT'] == 'test') {
    $app_id = '444444444444444';
  }
}

Why? because sharer.php is dead. You have to use one of facebook's other apis, and the share dialog is one the easiest to implement, but still requires an app id. See https://developers.facebook.com/docs/sharing/reference/share-dialog

Update 2015-02-19

Clone this wiki locally