-
Notifications
You must be signed in to change notification settings - Fork 7
OAuth Facebook
SmartJSONEditor edited this page Aug 19, 2017
·
6 revisions
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
<?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());
?>