Skip to content

OAuth Facebook

SmartJSONEditor edited this page Aug 19, 2017 · 6 revisions

Configure Facebook App Settings

In order to authorize with Facebook, your Facebook application must include allowed domains.

Setup Smart JSON Editor needs to be In application settings, define accepted domains in your Facebook app settings.

You must upload a single web page with redirect to : oauth-smartjsoneditor://oauth-callback/. Specify this page as your callbackURL

Redirect example

<?php
function preserve_qs() {
    if (empty($_SERVER['QUERY_STRING']) && strpos($_SERVER['REQUEST_URI'], "?") === false) {
        return "";
    }
    return "?" . $_SERVER['QUERY_STRING'];
}
header("Status: 301 Moved Permanently");
header("Location: oauth-smartjsoneditor://oauth-callback/" . preserve_qs());
?>
Clone this wiki locally