Welcome Developers!

in

Welcome!

in

PostTo callback is not called

Last post 12-18-2008 4:03 PM by rondata. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 12-18-2008 2:55 PM

    PostTo callback is not called

    PostTo callback isn't called whatsoever.
    Look at this sample app (based on a sample by MySpace Developers Team).
    I put this on the Canvas page but the callback is never called.
    Go ahead and try this yourselves.
    Any ideas why? Tongue Tied

    ____________________________________________________________

     <script>
    window.osContainer = opensocial.Container.get();

        function postBlogCallback(){
        var os_token = MyOpenSpace.MySpaceContainer.OSToken;
        var message = opensocial.newMessage("I am a blog post");
        
        message.setField(opensocial.Message.Field.TITLE, "About Testing");
        message.setField(opensocial.Message.Field.TYPE, MyOpenSpace.PostTo.Targets.BLOG);
        
        osContainer.postTo(os_token, message, null, ptCallback);
    }


    function ptCallback(someVal){
        if (someVal == MyOpenSpace.PostTo.Result.ERROR) {
            document.write('callback gave error')
        }
        else if (someVal == MyOpenSpace.PostTo.Result.CANCELLED) {
            document.write('user cancelled PostTo')
        }
        else if (someVal == MyOpenSpace.PostTo.Result.SUCCESS) {
            document.write('WE ARE MEETING WITH GREAT SUCCESS!!!')
        }
        else {
            document.write('Unrecognized response: ' + someVal)
        }
    }

    postBlogCallback();

    </script>


    Filed under: ,
  • 12-18-2008 3:16 PM In reply to

    Re: PostTo callback is not called

     Hi yes we are aware and think we've located the issue. Waiting for an ETA for when it will be fixed. There is another thread on this. Be sure to follow us on twitter for updates.

  • 12-18-2008 3:17 PM In reply to

    Re: PostTo callback is not called

    P.S.

    Can anyone tell for sure whether  requestSendMessage has a callback function too?

  • 12-18-2008 3:21 PM In reply to

    Re: PostTo callback is not called

     Hi again!

    I've been told both were having issues this AM. 

    I'll prob only continue to update one thread, so please check in here: http://developer.myspace.com/Community/forums/t/6350.aspx

  • 12-18-2008 3:51 PM In reply to

    • amy
    • Top 500 Contributor
    • Joined on 10-24-2008
    • Posts 13

    Re: PostTo callback is not called

    Just to confirm, I am having same issue.  I have searched other apps their invites are failing too (since they rely on the callback).

     

  • 12-18-2008 4:03 PM In reply to

    Re: PostTo callback is not called

    Thanks Amy. I'll let you know as soon as we have a eta for a fix.

Page 1 of 1 (6 items)