Welcome Developers!

in

Welcome!

in

Help me!

Last post 09-01-2010 11:52 AM by Joel. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 08-19-2010 9:02 PM

    • Khanh
    • Not Ranked
    • Joined on 07-29-2010
    • Posts 3

    Help me!

    i have a application perl. It is a game on web. But i don't know how to put it into myspace. Everyone can help me! thank so much.
  • 08-20-2010 3:05 PM In reply to

    Re: Help me!

     Hi,

    You can download Opensocial perl library here:

    http://wiki.opensocial.org/index.php?title=Client_Libraries

     

    You should decide if this app is going to be an onsite app or an offsite app (MyspaceID) then develop accordingly.

    See here to start:

    http://developer.myspace.com/wordpress/

     

     

    thanks,

    Joel

  • 08-22-2010 9:44 PM In reply to

    • Khanh
    • Not Ranked
    • Joined on 07-29-2010
    • Posts 3

    Re: Help me!

     I have been tried it but i can't get my information from myspace.

        use Net::OpenSocial::Client;
        use Net::OpenSocial::Client::Request;
        use Net::OpenSocial::Client::Request::FetchFriends;
        use Net::OpenSocial::Client::Container::MySpace;
        use Net::OpenSocial::Client::Type::Auth qw(OAUTH ST);
        use Net::OpenSocial::Client::Type::Format qw(JSON XML);
        use Net::OpenSocial::Client::Type::Protocol qw(REST RPC);
        use Data::Dump qw(dump);

        my $client = Net::OpenSocial::Client->new(
            container       => Net::OpenSocial::Client::Container::MySpace->new,
            consumer_key    => q{http://www.myspace.com/547505926},
            consumer_secret => q{7f4572020074465f847b5d486b129ad36f08c33fe9fc493aa9feb1286fbe808c},
         #   requestor       => q{???},    <=== how to know it??  
            auty_type     => OAUTH,
            format_type   => JSON,
            protocol_type   => REST,
        );    # $client return is null  ???

      my $user_id = @me';
        my $person = $client->get_person( $user_id )
            or die $client->errstr;
     print $person->get_field('id');

     what wrong?? Can you help me? thanks

  • 08-23-2010 4:59 PM In reply to

    Re: Help me!

     Can you send developerrelations@myspace-inc.com a Wireshark pcap http capture of the actual request and failure response? It will help us determine where the issue lies.

     

    thanks,

    Joel

  • 08-23-2010 7:35 PM In reply to

    • Khanh
    • Not Ranked
    • Joined on 07-29-2010
    • Posts 3

    Re: Help me!

    This is code my perl file :

    #!/opt/local/bin/perl
    use strict;
    use warnings;
    use WWW::Myspace;

    $| = 1;
    my $username = 'bladekhanh85@yahoo.com.vn';
    my $password = "0909134797";
    my @friends;
    print "Username: $username\tPassword: $password\n";
    print "Logging in... ";
    my $myspace = WWW::Myspace->new( $username, $password );
    print "done\n";


    if ( ! $myspace->logged_in ) {
      print "Unable to login: " . $myspace->error . "\n";
    }
    # Get list of your friends
    print "Getting friends... ";
    @friends = $myspace->get_friends;
    print "done\n";

    my $friend;
    foreach $friend (@friends) {
     eval {
        print "friend id.:". $friend ."\n";
       
        my $friend_name = $myspace->friend_user_name($friend);
        print "name......:" . $friend_name . "\n";
       
        my $last_login = $myspace->last_login_ymd($friend);
        print "last login:". $last_login. "\n\n";
      };
      if ($@) {
        print "Unable to complete request: $@\n\n";
      }
    }

    ######################################  Console ######################################################

    Username: bladekhanh85@yahoo.com.vn    Password: 0909134797
    Logging in... done
    Getting friends... done
    friend id.:
    Use of uninitialized value $friend in concatenation (.) or string at /root/workspace/OpenSocial/get_profile.cgi line 31.
    Use of uninitialized value $friend_id in pattern match (m//) at /usr/local/share/perl/5.10.1/WWW/Myspace.pm line 2081.
    Use of uninitialized value $friend_id in concatenation (.) or string at /usr/local/share/perl/5.10.1/WWW/Myspace.pm line 2085.
    Error getting page:
      500 Can't connect to home.myspace.com:80 (Bad hostname 'home.myspace.com')

    Can't call method "decoded_content" on an undefined value at /usr/local/share/perl/5.10.1/WWW/Myspace.pm line 1728.

    #################################################################################

     When i debuged a line "@friends = $myspace->get_friends;". Value of friends is null. I don't understand why, although connected to my account

     

  • 08-25-2010 4:07 PM In reply to

    Re: Help me!

     It would probably be better for you to share this information in private by emailing developerrelations@myspace-inc.com instead. Also a Wireshark .pcap http capture will tell us exactly why the underlying API call is failing.

     

    thanks,

    Joel

  • 09-01-2010 11:52 AM In reply to

    Re: Help me!

     Your issue has been escalated to the proper personnel and shall be replied to shortly.

     

    thanks,

    Joel

Page 1 of 1 (7 items)