0

buddyInfo is blank

Everytime I log in, and send the request to the notification server, the buddyInfo inside the json returned is always blank now. Before I used to see the logged on buddies, but now its nothing there:
{ "@pendingMsg" : 0, "@syncStatus" : 0, "responses" : [ { "buddyInfo" : { "sequence" : 1 } }
] }

Can anyone confirm if it's still working for them fine? I am able to get the offline msgs, presence status change etc, but not seeing the buddyInfo.

My call to fetch notifications is like this:
string pushUrl = GlobalVariables.URL_YM_NOTIFICATION_LONG +
"?oauth_consumer_key=" + GlobalVariables.consumerKey +
"&oauth_nonce=" + new Random().Next(123400, 9999999).ToString() +
"&oauth_signature=" + GlobalVariables.consumerSecret + "%26" + GlobalVariables.oauthTokenSecret +
"&oauth_signature_method=PLAINTEXT" +
"&oauth_timestamp=" + GlobalVariables.getTimestamp() +
"&oauth_token=" + GlobalVariables.oauthToken +
"&oauth_version=1.0" +
"&sid=" + GlobalVariables.sessionId +
"&seq=" + GlobalVariables.seq +
"&format=json" +
"&count=100" +
"&idle=120";

and I am sending the IM cookie like this:

CookieContainer container = new CookieContainer();
Cookie cookie = new Cookie("IM", GlobalVariables.IM);
container.Add(new Uri(pushUrl), cookie);
pushRequest.CookieContainer = container;
pushRequest.Method = "GET";

by
2 Replies
  • QUOTE (Hassan K @ Feb 13 2011, 02:03 PM) <{POST_SNAPBACK}>
    Everytime I log in, and send the request to the notification server, the buddyInfo inside the json returned is always blank now. Before I used to see the logged on buddies, but now its nothing there:
    { "@pendingMsg" : 0, "@syncStatus" : 0, "responses" : [ { "buddyInfo" : { "sequence" : 1 } }
    ] }

    Can anyone confirm if it's still working for them fine? I am able to get the offline msgs, presence status change etc, but not seeing the buddyInfo.

    My call to fetch notifications is like this:
    string pushUrl = GlobalVariables.URL_YM_NOTIFICATION_LONG +
    "?oauth_consumer_key=" + GlobalVariables.consumerKey +
    "&oauth_nonce=" + new Random().Next(123400, 9999999).ToString() +
    "&oauth_signature=" + GlobalVariables.consumerSecret + "%26" + GlobalVariables.oauthTokenSecret +
    "&oauth_signature_method=PLAINTEXT" +
    "&oauth_timestamp=" + GlobalVariables.getTimestamp() +
    "&oauth_token=" + GlobalVariables.oauthToken +
    "&oauth_version=1.0" +
    "&sid=" + GlobalVariables.sessionId +
    "&seq=" + GlobalVariables.seq +
    "&format=json" +
    "&count=100" +
    "&idle=120";

    and I am sending the IM cookie like this:

    CookieContainer container = new CookieContainer();
    Cookie cookie = new Cookie("IM", GlobalVariables.IM);
    container.Add(new Uri(pushUrl), cookie);
    pushRequest.CookieContainer = container;
    pushRequest.Method = "GET";


    Are you polling for the notification immediately after login? The buddyInfo notification after login will typically come in batches, and can take a few seconds sometimes. The other thing I noticed is your notification indicates sequence value 1. Can you confirm that you are polling and requesting to start from sequence value 0?
    0
  • QUOTE (Vivek Aggarwal @ Feb 15 2011, 12:23 PM) <{POST_SNAPBACK}>
    Are you polling for the notification immediately after login? The buddyInfo notification after login will typically come in batches, and can take a few seconds sometimes. The other thing I noticed is your notification indicates sequence value 1. Can you confirm that you are polling and requesting to start from sequence value 0?


    Yes, I am polling for notifications immediately after login. Basically, after a successful login, I redirect to the 2nd page where I call the notifications URL to send me the data that it has for me. So if you say the data comes in batches, how to wait and populate the buddy list? Let it do automatically whenever it does?
    I checked the sequence number, and I was incrementing it to 1 before sending my first notification request. I changed it to 0, and saw the buddyinfo populated with the logged on users :)Thanks for pointing it out to me.
    0

Recent Posts

in Messenger IM SDK