getLoginUrl() public method

Get a Login URL for use with redirects. By default, full page redirect is assumed. If you are using the generated URL with a window.open() call in JavaScript, you can pass in display=popup as part of the $params.
public getLoginUrl ( string $scope = '', string $display = 'page' ) : string
$scope string blank space separated list of requested extended perms
$display string Authorization page style, 'page', 'popup', 'touch' or 'mobile'
return string the URL for the login flow
Example #1
0
 function getUrl($redirectUri)
 {
     $baidu = new BaiduAPI(BAIDU_KEY, BAIDU_SECRET, $redirectUri, new BaiduCookieStore(BAIDU_KEY));
     $loginUrl = $baidu->getLoginUrl();
     return $loginUrl;
 }