Facebook PHP SDK - 'next'参数与getLogoutUrl一起使用但不与getLoginURL()一起使用

时间:2012-04-09 01:23:56

标签: php facebook redirect login sdk

'next'参数与getLogoutUrl()一起使用但不与getLoginUrl()一起使用,我做错了什么?

getLogoutUrl(array('next' => site_url()))

getLoginUrl(array('next' => site_url(), 'scope' => 'email'))

1 个答案:

答案 0 :(得分:1)

对于loginurl应该是redirect_uri:


$params = array(
  scope => 'your_permissions_here',
  redirect_uri => 'Redirect_URL' //user will be redirected to this URL on both success or failure
);
  $loginUrl = $facebook->getLoginUrl($params);