GetInfo() fails..

Feb 25, 2010 at 7:34 PM

Hello,

I want to get birthday info of all my friends.. But developer toolkit fails me all the time.

I put code in PreInit section

protected void Page_PreInit(object sender, EventArgs e)
        {
            fbID = this.Master.Api.Friends.Get();
            
            for (int i = 0; i < arkadaslarID.Count; i++)
            {
                sBirth.Add(Master.Api.Users.GetInfo(fbID[i]).birthday); //lineA
                sNames.Add(Master.Api.Users.GetInfo(fbID[i]).name);
            }

But the code doesn't respond.. If i do this while removing lineA of code.. it works.

 

Even i did it for a specific user's birthday.. it does not work. For example..

for (int i = 0; i < arkadaslarID.Count; i++)
            {
                sBirth.Add(Master.Api.Users.GetInfo(34636363).birthday); //lineA
                sNames.Add(Master.Api.Users.GetInfo(fbID[i]).name);
            }

 

But i run the code, with one line.. it works.. What a mess..!

sBirth.Add(Master.Api.Users.GetInfo(34636363).birthday); //lineA

This works also..:

for (int i = 0; i < arkadaslarID.Count; i++)
            {
                sNames.Add(Master.Api.Users.GetInfo(fbID[i]).name);
            }

 

Why successive calls fails the library? What can i do?

 

Thank you in advance