On Wed, Sep 17, 2008 at 11:21 PM, moparthi <[EMAIL PROTECTED]> wrote:
>
> hi Trevor,
>
> I just did wht u said even it showing same error i.e., Non
> AuthsubToken
>
> After modifying code appears like this,
>
> try:
>  from xml.etree import ElementTree
> except ImportError:
>  from elementtree import ElementTree
> import gdata.alt.appengine
> import gdata.calendar.service
> import gdata.service
> import atom.service
> import atom
> import getopt
> import sys
> import string
> import cgi, sys
> import cgitb; cgitb.enable()  # for troubleshooting
> import time
>
> class CalendarExample:
>
>  def __init__(self):
>    print ""
>
>  def GetAuthSubUrl(self):
>    next = 'http://localhost:8080/'
>    scope = 'http://www.google.com/calendar/feeds/'
>    secure = False
>    session = True
>    self.calendar_service = gdata.calendar.service.CalendarService()
>    return self.calendar_service.GenerateAuthSubURL(next, scope,
> secure, session)
>
>  def _login(self):
>    authSubUrl = self.GetAuthSubUrl()
>    print '<a href="%s">Login to your Google account</a>' % authSubUrl
>    parameters = cgi.FieldStorage()
>    print '<br/> Parameters is %s ' % (parameters,)
>    if parameters.has_key('token'):
>      print '<br/>hello'
>      authsub_token = parameters['token']
>      print '<br/>AuthSub token is %s ' % (authsub_token,)
>      self.calendar_service = gdata.calendar.service.CalendarService()
>      self.calendar_service.auth_token = authsub_token
>      self.calendar_service.UpgradeToSessionToken()
> ##      feed = calendar_service.GetCalendarListFeed()
> ##      for i, a_calendar in enumerate(feed.entry):
> ##        print '\t%s. %s' % (i, a_calendar.title.text,)
>
> def main():
>  sample = CalendarExample()
>  sample._login()
>
> if __name__ == '__main__':
> #  print '\n Main If condition'
>  main()
>
> after receiving token i just tried to UpgradeToSessionToken(). But
> even it showing same error.
>
> Can u write a script that helpful to me.
>
> regards,
> moparthi.

Hi Moparthi,
What is the output you get when you run this program? Are you
successfully able to extract the single-use token given to you by the
server?

-- 
Trevor Johns

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to