MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

requestShareApp invites

Last post 03-25-2009 2:07 PM by stephane arcos. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 08-04-2008 8:57 AM

    • Danny
    • Top 100 Contributor
    • Joined on 03-03-2008
    • Posts 36

    requestShareApp invites

    How can I implement the invitation with requestShareApp, Im using this code but Im Getting this message error "MyOpenSpace is not defined"

     <div id="picker"></div>

    <script>

    MyOpenSpace.ClientLibraries.includeScript(MyOpenSpace.ClientLibraries.Scripts.MYSPACE_WIDGETS);

    MyOpenSpace.Widgets.Bootstrapper.createWidget("MyOpenSpace.Widgets.FriendPicker", function(p){window.friendPicker = p;},
       {
         element: "picker",
         buildSelectedUI: true,
         friendClickAction: sendAppAdd
       });

    function sendAppAdd(person){

    if(person == null){
       return;
    }

    message = opensocial.newMessage("[sender] would like you to install this really super application [app].");
     
    opensocial.requestShareApp(person.getField(opensocial.Person.Field.ID), message, function(){ }
      );
    }

    </script>

  • 08-04-2008 9:34 AM In reply to

    Re: requestShareApp invites

    Hmm...looks ok. What is your AppID? 

    Follow us on twitter:
    http:www.twitter.com/myspacedevteam

    Follow the MDP profile
    http://www.myspace.com/myspacedeveloperplatform
  • 08-04-2008 2:25 PM In reply to

    • Danny
    • Top 100 Contributor
    • Joined on 03-03-2008
    • Posts 36

    Re: requestShareApp invites

     My app id is 104315 , and Im using external Iframe

  • 08-07-2008 10:05 AM In reply to

    • Danny
    • Top 100 Contributor
    • Joined on 03-03-2008
    • Posts 36

    Re: requestShareApp invites

    hello? 

  • 08-22-2008 10:50 AM In reply to

    Re: requestShareApp invites

    Sorry, I lost you're post for a little. Are you still getting the error? 

    Follow us on twitter:
    http:www.twitter.com/myspacedevteam

    Follow the MDP profile
    http://www.myspace.com/myspacedeveloperplatform
  • 08-22-2008 1:03 PM In reply to

    Re: requestShareApp invites

     Hi Jonathan,

     

    That code is working when i  use App type as "HTML/Javascript Source" but not for externatl iframe
    . Could you please suggest me how to use the with external iframe?

     Thank you,

     

    Koushik  

  • 08-22-2008 1:30 PM In reply to

    Re: requestShareApp invites

    is there any way i could customize the layout(apply styles)? or atleast the text(and also the styles) inside the <span id="FriendPicker_picker_mys_popTrigger" </span>?

     Thank you,

  • 08-22-2008 2:56 PM In reply to

    Re: requestShareApp invites

    Danny:
    MyOpenSpace.ClientLibraries.includeScript(MyOpenSpace.ClientLibraries.Scripts.MYSPACE_WIDGETS);
     

    This line will cause trouble as an External IFrame app.  The dynamic script include uses a relative path the to widgets source.  For an IFrame app you would need to set a direct script source link to the path to the widgets script file

    (currently: MyOpenSpace003.Widgets.js)

     ex:

    <script src="http://api.msappspace.com/OpenSocial/MyOpenSpace003.Widgets.js" ></script>

    You can then  create the friendpicker directly:

    window.friendPicker = new MyOpenSpace.Widgets.FriendPicker(
       {
         element: "picker",
         buildSelectedUI: true,
         friendClickAction: sendAppAdd
       });

     The down side to this approach is that you will not benefit from code updates since you are hard coding to a particular version of the widgets library.

     

  • 08-23-2008 10:01 AM In reply to

    • Test
    • Not Ranked
    • Joined on 02-05-2008
    • Posts 3

    Re: requestShareApp invites

     Hey,

     I am also trying to implement the inviter in an iFrame and I am not having any luck with your suggestion.  I have the code stripped to the bare minimum outlined by you, however it is still not working.  Here is what I have:

     

    =========== BEGINNING OF THE BASIC CODE ================


    <script src="http://api.msappspace.com/OpenSocial/MyOpenSpace003.Widgets.js" ></script>

     <div id="picker"></div>

    <script>

    window.friendPicker = new MyOpenSpace.Widgets.FriendPicker(
       {
         element: "picker",
         buildSelectedUI: true,
         friendClickAction: sendAppAdd
       });
        
    function sendAppAdd(person){

    if(person == null){
       return;
    }

    message = opensocial.newMessage("[sender] would like you to install this really super application [app].");
     
    opensocial.requestShareApp(person.getField(opensocial.Person.Field.ID), message, function(){ }
      );
    }

    </script>

    =========== END OF THE BASIC CODE ================

     

    [http://www.socialqna.com/myspace_apps/viral/] is the location listed in the iframe form field.

     Like the other guy above said, I am able to get it to work if i choose "HTML/Javascript Source" in the application builder.

     my app id is 112239

     Thanks

  • 10-31-2008 7:12 AM In reply to

    • Jason
    • Top 75 Contributor
    • Joined on 06-04-2008
    • Posts 54

    Re: requestShareApp invites

    does anyone have this working in an IFrame if so can you send me some hints i been trying for 3 days. every sample i have seen uses diffrent versons  of JS libs and none of them are in the offical libraries.


  • 11-10-2008 6:23 AM In reply to

    Re: requestShareApp invites

    im also stuck on this  iframe problem :(
  • 11-11-2008 2:10 AM In reply to

    Re: requestShareApp invites

     The same for me... :'(

    Please, help. Any ideas?

  • 11-12-2008 1:09 PM In reply to

    • Jason
    • Top 75 Contributor
    • Joined on 06-04-2008
    • Posts 54

    Re: requestShareApp invites

     Does MySpace offer paid support i'd pay at this point just to get it working?

  • 11-20-2008 10:42 AM In reply to

    Re: requestShareApp invites

     

    any updates guys my app currently has no way of inviting users / making feed posts

    i feel left out :(

  • 03-25-2009 2:07 PM In reply to

    Re: requestShareApp invites

     wow, its been month people have asked ?

Page 1 of 1 (15 items)