Hi all,

I want to create a gadget which will access all the calenders of user
and display the calender events in the form of a List(Like we see in
calender agenda).

I tried using OAuth, but there are limitations...
1. Not supported in .co.in domain.
2. The gadget does not work on a user site(site that a user can create
in his/her google account at http://sites.google.com). I created a
gadget that accesses user calenders and displays their titles. This
gadget works fine on igoogle home page, but does not work on
http://sites.google.com sites.

Now i am trying authSub but unable to implement it.


<?xml version="1.0" encoding="UTF-8" ?>
<Module>
        <ModulePrefs title="CalenderContent"
                author="VJ"
                author_email="[email protected]"
                directory_title="DynamicContent"
                description="No Description By VJ"
                height="200"
                width="330"
                scrolling="false"
                singleton="false" />


        <Content type="html"><![CDATA[
                <script type="text/javascript" 
src="http://www.google.com/jsapi";>
                </script>

                <script>
                        var calendarService;
                        var feedUri 
='http://www.google.com/calendar/feeds/default/
allcalendars/full';

                        var callback = function(result) {
                                var entries = result.feed.entry;
                                for (var i = 0; i < entries.length; i++) {
                                        var calendarEntry = entries[i];
                                        var calendarTitle = 
calendarEntry.getTitle().getText();
                                        alert('Calendar title = ' + 
calendarTitle);
                                }
                        }

                        var handleError = function(error) {
                                alert("Failed Baidly");
                                alert(error);
                        }

                        function logMeIn() {
                                alert(" logMeIn");
                                scope = "http://www.google.com/calendar/feeds/";;
                                var token = google.accounts.user.login(scope);
                                if((google.accounts.user.checkLogin(scope)) !== 
""){
                                        alert("Scope Exist");
                                }
                                if((google.accounts.user.checkLogin(scope)) == 
""){
                                        alert("Scope does not Exist");
                                }
                        }

                        function setupMyService() {
                                alert("setupMyService");
                                calendarService = new 
google.gdata.calendar.CalendarService
('GoogleInc-jsguide-1.0');
                                logMeIn();
                        }

                        function getMyCalender() {
                                alert("getMyCalender");
                                setupMyService();
                                if((google.accounts.user.checkLogin(scope)) !== 
""){
                                        alert("Scope Exist");//this should be 
alerted, but not happening
                                }
                                if((google.accounts.user.checkLogin(scope)) == 
""){
                                        alert("Scope does not Exist");//this is 
being alerted
                                }
                                calendarService.getAllCalendarsFeed(feedUri, 
callback,
handleError);
                        }
                        function loadCalenderAPI() {
                                google.load("gdata", "1");
                                google.setOnLoadCallback(getMyCalender);
                        }
                        _IG_RegisterOnloadHandler(loadCalenderAPI);

                </script>
                ]]>
        </Content>
</Module>


But its not working.......can anyone tell me solution or the mistake I
am doing.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" 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-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to