我试图使用克卡API在PHP。

我使用Zend框架

function getAuthSubUrl($company) 
{
  $next = "http://$company.mysite.com";
  $scope = 'http://www.google.com/calendar/feeds/';
  $secure = false;
  $session = true;
  return (Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure, $session));
}
$authSubUrl = getAuthSubUrl();
echo "<a href=\"$authSubUrl\">login to your Google account"</a> 

我不知道我在做什么错在这里。我下面的谷歌例如几乎完全

他们有$next = getCurrentUrl();在他们expample但我正在逐渐不确定的错误,当我尝试。

有帮助吗?

解决方案

我计算出来,我用这是转发到基于该子域的网页的子域。我猜测谷歌试图以确保您的$下一个页面是真实的,雷人只是转发。有一次,我旁边的主域名由$它工作得很好。然后,我只是增加了一些GET瓦尔的URL转发回正确的地方。

//$next = "http://$company.mysite.com";
  $next = "http://mysite.com?company=$company";
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top