Thanks for the reply Gijsbert, the global myservice was included earlier in the bit I didn't paste. After further debugging with alerts, it seems that the response received after sending the request comes back as:
obj.data = null obj.error = undefined obj.text = Unauthenticated obj.oauthErrorText = undefined obj.oauthApprovalUrl = undefined obj.oauthError = undefined I even tried the standard contact.xml gadget included on http://code.google.com/apis/gadgets/docs/oauth.html with the same results. So I must be doing something wrong, but for life of me can't figure it out! Cheers, Simon. On Oct 13, 3:50 pm, Gijsbert <gijsbert.de.h...@gmail.com> wrote: > I don't see a global var myService; So fetchMyData() will not find the > myService from init(). > You can also pass myService as a parameter to fetchMyData() from init > (). > > On Oct 12, 10:52 am, simonporter007 <simonporter...@gmail.com> wrote: > > > Hi guys, > > > I have got the following code: > > > function callback(obj) { > > alert(obj.data); > > alert(obj.errors); > > alert(obj.text); > > alert(obj.oauthApprovalUrl); > > alert(obj.oauthError); > > alert(obj.oAuthErrorText); > > } > > function fetchMyData() { > > jQuery('#errors').hide(); > > myService.getEventsFeed(feedUrl, callback , > > callback); > > } > > function init() { > > google.load("gdata", "1", {packages: ['calendar']}); > > google.setOnLoadCallback(function () { > > myService = new > > google.gdata.calendar.CalendarService('google- > > calendarwave-v1'); > > myService.useOAuth('google'); > > fetchMyData(); > > });} > > > gadgets.util.registerOnLoadHandler(init); > > > I am having difficulty making the callback invoke after it sends the > > request for the EventsFeed (which obviously fails because > > authorization has not yet been granted) I can see in the firebug > > console log the > > "throw 1; < don't be evil' >{"http://www.google.com/calendar/ > > feeds/...." > > > I can't see why it wont use the callback function, even to the extent > > of removing everything from the callback function and making it just > > display an alert, this doesn't get triggered either. > > > Any help would be appreciated, I can't seem to figure this one out > > even after searching all over google. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to google-wave-api@googlegroups.com To unsubscribe from this group, send email to google-wave-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en -~----------~----~----~----~------~----~------~--~---