MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

postTo Callback Function

Last post 07-17-2008 2:19 PM by Ritesh Khanna. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-23-2008 12:17 PM

    postTo Callback Function

    I noticed this doesn't work yet, any ETA on when it's going in??

     

    Pizza

  • 04-24-2008 1:01 PM In reply to

    Re: postTo Callback Function

    Callback is now active for PostTo

     There is an enum value:

     MyOpenSpace.PostTo.Result.ERROR

    MyOpenSpace.PostTo.Result.CANCELLED

    MyOpenSpace.PostTo.Result.SUCCESS

    Below is some example code:

     


    <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) {
    		alert('callback gave error')
    	}
    	else if (someVal == MyOpenSpace.PostTo.Result.CANCELLED) {
    		alert('user cancelled PostTo')
    	}
    	else if (someVal == MyOpenSpace.PostTo.Result.SUCCESS) {
    		alert('WE ARE MEETING WITH GREAT SUCCESS!!!')
    	}
    	else {
    		alert('Unrecognized response: ' + someVal)
    	}
    	
    }
    
    
    	
    </script>
    
    <h1>Call Me Back</h1>
    
    <button onclick="postBlogCallback()">Blog post with callback</button>
    
    
    
    
  • 04-29-2008 9:34 PM In reply to

    Re: postTo Callback Function

    it only works in Firefox, it is know that it does NOT work in Internet Explorer, please assist, my apps requires it!

  • 04-29-2008 10:32 PM In reply to

    Re: postTo Callback Function

    still not working on IE. 

    ETA?

     

  • 05-01-2008 7:55 AM In reply to

    Re: postTo Callback Function

    This is a known issue, Chad from the Container team has said a fix is coming, and there is no ETA.

  • 05-08-2008 4:27 PM In reply to

    • Chris
    • Not Ranked
    • Joined on 02-29-2008
    • Posts 1

    Re: postTo Callback Function

    I copy and pasted Chris Cole' code into a fresh canvas page and, when I click the button, an invisible iframe gets inserted into the DOM with a "The page cannot be found" error message. Am I missing something? This is in FF2 and Saf3 on OS X.
  • 06-02-2008 8:03 PM In reply to

    Re: postTo Callback Function

     Does anyone know if this was ever fixed in IE?

  • 07-17-2008 2:19 PM In reply to

    MYSPACE FRIEND FACTORY FORUM NOT FUNCTIONING

     Everytime anyone tries to read a post on the myspace friend factory discussion forum they are redirected back to their myspace homepage.  This is seriously interfering with our ability to read and process user feedback.

     

    Please respond asap 

     

    thanks 

Page 1 of 1 (8 items)