Advertisement
diabliyo

fbconnect 25 agosto 2011 p3

Aug 25th, 2011
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. public function getLoginUrl($params=array()) {
  2. $this->establishCSRFTokenState();
  3. $currentUrl = $this->getCurrentUrl();
  4. return $this->getUrl(
  5. 'www',
  6. 'dialog/oauth',
  7. array_merge(array(
  8. 'client_id' => $this->getAppId(),
  9. 'redirect_uri' => $currentUrl, // possibly overwritten
  10. 'state' => $this->state),
  11. $params));
  12. }
  13.  
  14. public function getLogoutUrl($params=array()) {
  15. if( !HAPPY_URL ) # s no existen URLS_Amigables
  16. $currentUrl = $this->getCurrentUrl();
  17. else $currentUrl = HTTP_SERVER. 'log/out/facebook'; # tomamos nuestra URL
  18. return $this->getUrl(
  19. 'www',
  20. 'logout.php',
  21. array_merge(array(
  22. 'next' => $currentUrl,
  23. 'access_token' => $this->getAccessToken(),
  24. ), $params)
  25. );
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement