@@ -588,11 +588,15 @@ public function getLoginUrl($params=array()) {
588588 return $ this ->getUrl (
589589 'www ' ,
590590 'dialog/oauth ' ,
591- array_merge (array (
592- 'client_id ' => $ this ->getAppId (),
593- 'redirect_uri ' => $ currentUrl , // possibly overwritten
594- 'state ' => $ this ->state ),
595- $ params ));
591+ array_merge (
592+ array (
593+ 'client_id ' => $ this ->getAppId (),
594+ 'redirect_uri ' => $ currentUrl , // possibly overwritten
595+ 'state ' => $ this ->state ,
596+ 'sdk ' => 'php-sdk- ' .self ::VERSION
597+ ),
598+ $ params
599+ ));
596600 }
597601
598602 /**
@@ -618,24 +622,14 @@ public function getLogoutUrl($params=array()) {
618622 /**
619623 * Get a login status URL to fetch the status from Facebook.
620624 *
621- * The parameters:
622- * - ok_session: the URL to go to if a session is found
623- * - no_session: the URL to go to if the user is not connected
624- * - no_user: the URL to go to if the user is not signed into facebook
625- *
626625 * @param array $params Provide custom parameters
627626 * @return string The URL for the logout flow
628627 */
629628 public function getLoginStatusUrl ($ params =array ()) {
630- return $ this ->getUrl (
631- 'www ' ,
632- 'extern/login_status.php ' ,
629+ return $ this ->getLoginUrl (
633630 array_merge (array (
634- 'api_key ' => $ this ->getAppId (),
635- 'no_session ' => $ this ->getCurrentUrl (),
636- 'no_user ' => $ this ->getCurrentUrl (),
637- 'ok_session ' => $ this ->getCurrentUrl (),
638- 'session_version ' => 3 ,
631+ 'response_type ' => 'code ' ,
632+ 'display ' => 'none ' ,
639633 ), $ params )
640634 );
641635 }
0 commit comments