AuthSub target path prefix does not match the provided "next" URL

Posted by dweebsonduty on Stack Overflow See other posts from Stack Overflow or by dweebsonduty
Published on 2010-03-15T06:05:41Z Indexed on 2010/03/15 6:09 UTC
Read the original article Hit count: 855

I am trying to use the Gcal API in PHP.

I am using the ZEND framework

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> 

I am not sure what I am doing wrong here. I am following the google example almost exactly.

They do have $next = getCurrentUrl(); in their expample but I am getting undefined errors when I try that.

© Stack Overflow or respective owner

Related posts about google-calendar-api

Related posts about google-authentication