0
我正在一個PHP應用程序,我需要在其中集成Dropbox。以下是我的代碼:PHP的Dropbox集成動態重定向uri
require_once ("../dropbox-sdk/Dropbox/autoload.php");
use \Dropbox as dbx;
$appInfo = dbx\AppInfo::loadFromJsonFile("../dropbox-config.json");
$csrfTokenStore = new dbx\ArrayEntryStore($_SESSION, 'dropbox-auth-csrf-token');
$redirect_uri = "https://www.myapp.com/redirecturi.php";
$webAuth = new dbx\WebAuth($appInfo, "MyApp", $redirect_uri, $csrfTokenStore);
$authorizeUrl = $webAuth->start();
這是工作的罰款與靜態重定向URI。但在我的應用程序,重定向uri將不同的子域,如https://abc.myapp.com/redirecturi.php,https://xyz.myapp.com/redirecturi.php等
但Dropbox不允許動態重定向uris。另一種解決方案是使用靜態重定向uri併發送參數,從中我可以創建uri。但我不知道如何發送參數。
謝謝,你能告訴我們該怎麼做? –