Welcome Developers!

in

Welcome!

in

about MySpaceID Notification API

Last post 09-16-2010 12:30 PM by Joel. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 09-03-2009 2:23 AM

    about MySpaceID Notification API

    Hi,

    Can I send notification to my friends from MySpaceID app (in case my app is still not published)?

    Thanks in advance!

    Filed under:
  • 09-04-2009 1:02 AM In reply to

    Re: about MySpaceID Notification API

    you can test notifications while the app is not published, but only to developers and testers of the application
  • 09-04-2009 8:00 PM In reply to

    Re: about MySpaceID Notification API

    Hi, other APIs work well for me. But notification api doesn't work as I expect. Would you please have a look at my code here? Is there anything wrong?

    function sl_myspace_api_send_notification(){
      require_once 'MySpaceID/myspace.php';
      $account = sl_myspace_load_account();
      if($account){
        $session_key = unserialize($account['session_key']);
        $ms = new MySpace(MYSPACE_CUSTOMER_KEY, MYSPACE_CUSTOMER_SECRET, $session_key['key'], $session_key['secret']);
        $userid = $ms->getCurrentUserId();
        $templateParams['content'] = 'MySpaceID is so banana :P!';
        $templateParams['button0_surface'] = 'canvas';
        $templateParams['button0_label'] = 'Blah blah blah!';
     
        $mediaItems = 'http://api.myspace.com/v1/users/'.$userid;
        $recipients = $userid;
        $ms->sendNotification(APP_ID, $recipients, $templateParams, $mediaItems);
        drupal_set_message(t('Done!'));
      }else{
        drupal_set_message(t('Damn!'));
      }
    }

    The return code is 1 and response message is 'Done!'. But when I check Mail/Notifications, I don't see anything.

    Thanks for any help!

    Sang.

    Filed under: ,
  • 09-08-2009 1:04 PM In reply to

    • Sergei
    • Not Ranked
    • Joined on 01-25-2009
    • Posts 9

    Re: about MySpaceID Notification API

     Hi,

    I have the same problem, but with myspaceId java SDK. Can anybody help us? Why notifications are not posted, even if returned response is {"postnotificationstatus":"posted"}?

    Should I design message template on app page? As I understand after reading MySpaceID doc, I might not do this, because I'm using REST API endpoint.

    Please advice,

    It's urgent problem for me.

  • 09-17-2009 2:48 AM In reply to

    Re: about MySpaceID Notification API

     I am having similar problem. The notification never reaches the intended person. Could any of you reply on this.

     

  • 02-22-2010 1:04 AM In reply to

    • radix
    • Not Ranked
    • Joined on 01-17-2010
    • Posts 1

    Re: about MySpaceID Notification API

     I have the same problem. I published the app and add the recipients as Tester for my app, but it doesn't work :(. I use the Java SDK.

    Thx for any advice.

  • 02-22-2010 4:58 PM In reply to

    Re: about MySpaceID Notification API

     Radix,

    For a MyspaceID (external) app, you can only add developers, not testers. On an internal app you can add both.

     

    thanks,

    Joel

  • 03-08-2010 12:59 AM In reply to

    • Paul
    • Not Ranked
    • Joined on 02-23-2010
    • Posts 5

    Re: about MySpaceID Notification API

     i am having a similar (or maybe the same) problem.

    my application is in development-status and i have 2 developer accounts assigned to it. i try to send a notification from one to the other. as a response i get

    "HTTP/1.1 201 Created"

    but the notification never arrives!

     i have another question related to notifications: when the application is published, is it possible to send notifications to users that don't have the application installed?

     

    thank you

  • 03-08-2010 11:35 AM In reply to

    Re: about MySpaceID Notification API

    Hi,

    Notifications only work for app users.

     

    Can you check the users permissions&settings for the app and be sure that notifications are actually allowed for the app? If they are, please send the following to developerrelations@myspace-inc.com:

     

    AppID

    Consumer key and secret

    Wireshark capture of the request and response

    The app permissions of the two users (ie can they send/receive these notifications)

     

     

    thanks,

    Joel

  • 03-08-2010 11:49 PM In reply to

    • Paul
    • Not Ranked
    • Joined on 02-23-2010
    • Posts 5

    Re: about MySpaceID Notification API

     i cannot find any permissions and settings for the app, because it doesn't appear under "my apps" (in the normal "profile"->"my apps" category) only when i go into the http://developer.myspace.com/Apps.mvc command-center.

    Do i have to publish the app first?

    I have a related question: what exactly does publish do? am i able to change the application-details after publishing? because i really need to be able to change them again. (for example the "External URL:" etc). if i can't change them afterwards, it means that i have to publish an untested-app, to be able to test notifications, that doesn't seem very reasonable. it also doesn't seem reasonable to have to publish the app before developers can test all it's functionality.

    (by the way, the two developer-accounts are both able to access the application via http://developer.myspace.com/Apps.mvc  )

     

    i hope you can answer my questions, thanks again

  • 03-09-2010 2:13 PM In reply to

    Re: about MySpaceID Notification API

     Hi,

    Yes, you can change the app details afterwards and re-publish. You don't have to publish to perform full testing of the app and all its functions but only certain friends that you grant permissions to will be able to use it.

     

    -Joel

  • 09-09-2010 12:58 PM In reply to

    • Casiva
    • Not Ranked
    • Joined on 09-03-2010
    • Posts 4

    Re: about MySpaceID Notification API

     I have the same problem, i send the notification via myspace-php-sdk and recive 201 as response but nothing appends, the notification never reach the destiny, no error log as capture.

     This is the log of the request

    ::makeOAuthRequest::@2010-09-09T19:51:23+00:00
    _____________________________________________
    ::reqUrl::'POST'  http://api.myspace.com/v1/applications/195438/notifications
    ::reqParams::
    ::headers::
    Content-Type: application/x-www-form-urlencoded

    ::BODY::
    recipients=549136474&templateParameters=%7B%22content%22%3A%22Test%20notification%20content%20from%20php%20sdk%22%2C%22button0_surface%22%3A%22canvas%22%2C%22button0_label%22%3A%22Go%20To%20App%20Canvas%22%2C%22button1_surface%22%3A%22appProfile%22%2C%22button1_label%22%3A%22Go%20To%20App%20Profile%22%7D&mediaItems=%7B%22http%3A%2F%2Fx.myspacecdn.com%2Fimages%2Fno_pic.gif%22%7D


    ::makeHttpRequest::@2010-09-09T19:51:23+00:00
    _____________________________________________
    ::reqUrl::'POST'  http://api.myspace.com/v1/applications/195438/notifications?oauth_version=1.0&oauth_nonce=53e63f13bbce2c81f145f6100073140e&oauth_timestamp=1284061883&oauth_consumer_key=a9e3262a884c4f2393964c149728de81&oauth_token=CoHv1a2jljDkg2Q4WGo2cfaUj9Rb%2FMHnuwCkfuvn9GBnk23mro55NU6qvXMHqIYkgRdnOk428r0JkH6AKhavNYKjV6C60mgJctnZz4ATeuA%3D&oauth_signature_method=HMAC-SHA1&oauth_signature=FfIel1xnqmQb1xq%2BPKfH5CASbus%3D
    ::reqParams::
    ::custom headers::
    Content-Type: application/x-www-form-urlencoded

    ::bodyContent::
    recipients=549136474&templateParameters=%7B%22content%22%3A%22Test%20notification%20content%20from%20php%20sdk%22%2C%22button0_surface%22%3A%22canvas%22%2C%22button0_label%22%3A%22Go%20To%20App%20Canvas%22%2C%22button1_surface%22%3A%22appProfile%22%2C%22button1_label%22%3A%22Go%20To%20App%20Profile%22%7D&mediaItems=%7B%22http%3A%2F%2Fx.myspacecdn.com%2Fimages%2Fno_pic.gif%22%7D
    ::Sent Headers::
    Content-Type: application/x-www-form-urlencoded

    ::myspace response::@2010-09-09T19:51:24+00:00
    _____________________________________________
    :: contentType ::
    application/json

    :: status ::
    201

    :: headers ::
    HTTP/1.1 201 Notification sent
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Content-Length: 35
    Content-Type: application/json; charset=utf-8
    Expires: Sun, 19 Nov 1978 05:00:00 GMT
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    Set-Cookie: MSCulture=IP=200.5.113.234&IPCulture=es-AR&PreferredCulture=es-AR&PreferredCulturePending=&Country=QVI=&ForcedExpiration=634196334840746669&timeZone=0&myStuffDma=&myStuffMarket=&USRLOC=QXJlYUNvZGU9MCZDaXR5PUJ1ZW5vcyBBaXJlcyZDb3VudHJ5Q29kZT1BUiZDb3VudHJ5TmFtZT1BcmdlbnRpbmEmRG1hQ29kZT0wJkxhdGl0dWRlPS0zNC41ODc1JkxvbmdpdHVkZT0tNTguNjcyNSZQb3N0YWxDb2RlPSZSZWdpb25OYW1lPTA3JkxvY2F0aW9uSWQ9MA==; domain=.myspace.com; expires=Sat, 09-Oct-2010 19:51:24 GMT; path=/
    Set-Cookie: ASP.NET_SessionId=st3os555fyxnvjnl1bonyseb; path=/; HttpOnly
    X-Server: a74e01d392d873890739722a4700434dfd6dc83633326f15
    Date: Thu, 09 Sep 2010 19:51:23 GMT

    :: body ::
    {"postnotificationstatus":"posted"}

    :: raw ::
    HTTP/1.1 201 Notification sent
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Content-Length: 35
    Content-Type: application/json; charset=utf-8
    Expires: Sun, 19 Nov 1978 05:00:00 GMT
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    Set-Cookie: MSCulture=IP=200.5.113.234&IPCulture=es-AR&PreferredCulture=es-AR&PreferredCulturePending=&Country=QVI=&ForcedExpiration=634196334840746669&timeZone=0&myStuffDma=&myStuffMarket=&USRLOC=QXJlYUNvZGU9MCZDaXR5PUJ1ZW5vcyBBaXJlcyZDb3VudHJ5Q29kZT1BUiZDb3VudHJ5TmFtZT1BcmdlbnRpbmEmRG1hQ29kZT0wJkxhdGl0dWRlPS0zNC41ODc1JkxvbmdpdHVkZT0tNTguNjcyNSZQb3N0YWxDb2RlPSZSZWdpb25OYW1lPTA3JkxvY2F0aW9uSWQ9MA==; domain=.myspace.com; expires=Sat, 09-Oct-2010 19:51:24 GMT; path=/
    Set-Cookie: ASP.NET_SessionId=st3os555fyxnvjnl1bonyseb; path=/; HttpOnly
    X-Server: a74e01d392d873890739722a4700434dfd6dc83633326f15
    Date: Thu, 09 Sep 2010 19:51:23 GMT

    {"postnotificationstatus":"posted"}

     

  • 09-09-2010 2:18 PM In reply to

    Re: about MySpaceID Notification API

     This is an unfortunate issue with the Notifications API  - there are some additional checks done AFTER the ok response which can still result in failure to post it to the notifications folder for the user. It could involve the user not having the app, the user app settings (or general user privacy settings), or a message length that is too long. We are not experiencing any issues internally so this should go through if the proper conditions are met.

     

    thanks,

    Joel

  • 09-10-2010 7:45 AM In reply to

    • Casiva
    • Not Ranked
    • Joined on 09-03-2010
    • Posts 4

    Re: about MySpaceID Notification API

    Ok, i think that the problem is that the user don't have installed the application but i can't find how install the myspaceid application in the user profile.

     Any help is welcome

  • 09-10-2010 11:23 AM In reply to

    Re: about MySpaceID Notification API

     If it is a MyspaceID app, then the user who has never used it would simply go to your site to log in. Then in their SYNC settings in their account settings on Myspace, the app would show up there in the list of external (MyspaceID) apps.

     

    thanks,

    Joel

Page 1 of 2 (18 items) 1 2 Next >