Welcome Developers!

in

Welcome!

in

Error in container.v10.005.js

Last post 07-23-2010 1:49 PM by Joel. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-20-2010 5:28 AM

    • Lester
    • Not Ranked
    • Joined on 07-20-2010
    • Posts 1

    Error in container.v10.005.js

    Sometimes i get the following error when I try to send a notification or activity.

    Error:
    e.substr is not a function

    File:
    http://x.myspacecdn.com/OpenSocial/1.0/container.v10.005.js

    My code:

                function sendActivity(title, content, friend){
                    var params = {};
               
                    params[opensocial.Activity.Field.TITLE_ID] = "Gatcha_Activity";
                    params[opensocial.Activity.Field.TEMPLATE_PARAMS] = {"title": title, "content": content, "friend": friend};
               
                    //var mediaItemArray = [;
                    //mediaItemArray.push(opensocial.newMediaItem("", GATCHA_BASE + "/static/i/container/common/avatar-none.png"));
                    //params[opensocial.Activity.Field.MEDIA_ITEMS] = mediaItemArray;

                    var activity = opensocial.newActivity(params);
                    opensocial.requestCreateActivity(activity, opensocial.CreateActivityPriority.HIGH, callback);
                }
               
                function raiseNotification(content, url, recipient) {
                    var button = MyOpenSpace.newNotificationButton(MyOpenSpace.NotificationButton.UrlTypes.CANVAS, "Play", {"url": url});
                    var buttons = [button];
               
                    var params = {};
                    params[MyOpenSpace.Notification.Field.BODY] = content;
                    params[MyOpenSpace.Notification.Field.BUTTONS] = buttons;
                    var notification = MyOpenSpace.newNotification(params);
               
                    MyOpenSpace.requestCreateNotification(recipient, notification, callback);
                }

    I use OpenSocial-1.0

  • 07-20-2010 2:25 PM In reply to

    Re: Error in container.v10.005.js

     When you say "sometimes", what percentage of the time? We have been having some intermittent issues with invites, activities, and notifications for the past couple days that might explain this.

     

    thanks,

    Joel

  • 07-22-2010 12:13 AM In reply to

    Re: Error in container.v10.005.js

    It worked a few times 2 days ago, but since then it doesn't work anymore. It's very annoying because it makes it hard to test the application...

     

    PS: Lester is my testaccount :)

  • 07-22-2010 3:53 PM In reply to

    Re: Error in container.v10.005.js

     Are there steps I can take using your app to replicate this error consistently?

     

    thanks,

    Joel

  • 07-23-2010 2:02 AM In reply to

    Re: Error in container.v10.005.js

    1/ Go to http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=191805&pm_cmp=mdp_191805_Unknown&appParams={%22url%22:%22team%22}

    2/ Click on the yellow questionmark next to another user his name (http://img824.imageshack.us/img824/2680/picture2pv.png)

    3/ You'll see the error in FireBug

    My userid is  541624382

  • 07-23-2010 1:49 PM In reply to

    Re: Error in container.v10.005.js

     I cannot replicate since you are password-protecting your canvas apparently. Any idea why this is necessary?

     

    thanks,

    Joel

Page 1 of 1 (6 items)