i am doing lots of stuff for my Iworld application, since i wanna finish the application development phase ASAP,i can get start with my project report work earier..
someone says the facebook application is quite simple, people cant the picture and album information there, and i decided to go back the facebook platform to add some album information there.
the thing is harder than i excepted, cause, The facebook stuff is quite unlike the google one. and basically u need programming the code to pharse the xml which u query from the facebook webserive to a ASP.net C# class.
and The Ajax Tab controls aslo met some tricky problem when i am trying to add new tab and fill the album functions there.
the code im using for adding album function is like this:
IList<facebook.Schema.album> useralbum = fbService.photos.getAlbums();
foreach (facebook.Schema.album a in useralbum)
{
lableuseralbums.Text += “<tr><td>Album Name: ” + a.name + ” </td> <br>”;
lableuseralbums.Text += “<td>Album Description: ” + a.description + ” </td><br>”;
lableuseralbums.Text += “<td>Cover Picture :” + a.cover_pid + “<br> Created Date :”+a.created_date.Date+”<br> Modified Date: “+a.modified_date.Date+”</td></tr>”;
list_coverpid.Add(a.cover_pid);
}
this part is easy, but the problem coming with the facebook toolkits for get the album is that.. the received xml file only contained the cover_pid(21312u9312048) instead of the covered pic src url.. So it just add more difficulty for my work, i need post a FQL query to facebook database again with the current pid i got and retrieve the coverd_pic src from photo table in Database. The result is aslo a xml file, u probably need pharse it again to get the only little bit cover_pic src url :(
and another problem, i am trying to use labeloutput stream to display the result, but however, i cant do this kinda combination cause i need twice foreach to get all the data i neeed… firstly, got the album number, aid, cover_pid.. posing back pid to get the src …using foreach to display..
this doesnt work, after i paid about 2 hr to try to figure out a good solution. [or it can really works, but it will sacrify the data transfer performance and it gonna be a nightmare for my users, i think. ] – cause it will use three foreach to handle the problem, the u need communicate to facebook twice to get everything u needd there… Hoolly shXX;

So, i decided to go Dataset to saving these data first. and using GridView to pop up the result.
So, i add a DateSet, create a DataTable and add the Datacolum for the different fileds..
DataSet ds = new DataSet();
DataTable dt = ds.Tables.Add(“Album”);
DataColumn pk_name = dt.Columns.Add(“Album Name”, typeof(string));
dt.Columns.Add(“Desciption”, typeof(string));
dt.Columns.Add(“Created_Date”, typeof(DateTime));
dt.Columns.Add(“Cover_Pic”, typeof(string));
dt.Columns.Add(“Links”, typeof(string));
dt.Columns.Add(“Location”, typeof(string));
List<long> list_coverpid = new List<long>();
foreach (facebook.Schema.album a in useralbum)
{
DataRow dr = dt.NewRow();
dr["Album Name"] = a.name;
dr["Desciption"] = a.description;
dr["Created_Date"] = a.created_date;
dr["Links"] = a.link;
dr["Location"] = a.location;
dt.Rows.Add(dr);
list_coverpid.Add(a.cover_pid);
}
foreach (photo p in photos_coverpic)
{
al.Add(p.src_small);
}
for (int i = 0; i < photos_coverpic.Count; i++)
{
dt.Rows[i]["Cover_Pic"] = al[i].ToString();
}
GridView1.DataSource = ds.Tables[0].DefaultView;
GridView1.DataBind();
And u need go back the aspx page to edit the the colum and bind filed.
after done the hyper link and bound field adding, once the user click the picture album name it will redirect to the current album address and shown pictures there..i aslo can do another page to shown the different pictures in one album. however, consider of the time stuff. probably need save some time to focus on some main stream functions.
the current album i have done shown below:

i dont like to write too much stuff after i have done something….thats wrong i havent do blog for a while. but to keep it in my memory, i still need write down some critical thinks and problem solving process, otherwise, i will forget every quickly..
i have done the user’s uploaded videos retrieve and the youtube browser upload video from my site.. ill write more if i got time..Cheers..Everybody.. have good days..