This project is read-only.

update Facebook user profile box using profile.setFBML

Oct 7, 2008 at 12:53 AM
Edited Oct 7, 2008 at 4:53 PM
Hello,
I create a facebook application using ASP.Net & C++  via IFrame
I need some help with the profile box:

how can i update Facebook user profile box using profile.setFBML  ????? (using IFrame)


* i am getting res=true (successfull) but the profile box dont update !

please help !

here is my code:

Private

Sub Page_Load()

 

 

If fbApplication.Session.SessionType = Facebook.Service.Core.FacebookSessionType.User Then 

 

 

Dim profileFbml As String = Nothing

 

profileFbml = BuildProfileFbml(user.ID.ToString,

"greeting")

 

 

Dim service As FacebookService = fbApplication.Service

 

 

Dim res As Boolean  

 

 

 

res = service.Profile.SetFbml(profileFbml, user.ID.ToString)

 

fbApplication.Redirect(Me, service.ProfileUrl)

 

 


end if




 

Private Function BuildProfileFbml(ByVal ids As String, ByVal greeting As String) As String

 

Dim fbmlBuilder As New StringBuilder()

 

 

Dim msg As String = "hello"  
fbmlBuilder.Append("<div>")

 

 fbmlBuilder.Append(

"<fb:name capitalize=""true"" uid=""")

 

 fbmlBuilder.Append(fbApplication.Service.UserID)

fbmlBuilder.Append(

""" firstnameonly=""true"" />")

 

 fbmlBuilder.Append(

" says <b> ")

 

fbmlBuilder.Append(msg)

fbmlBuilder.Append(

"</b>")

 

 fbmlBuilder.Append(

"</div>")

 

 fbmlBuilder.Append(

"<div> Join ")

 

 fbmlBuilder.Append(

"<fb:name capitalize=""true"" uid=""")

 

 fbmlBuilder.Append(fbApplication.Service.UserID)

fbmlBuilder.Append(

""" firstnameonly=""true"" />")

 

 fbmlBuilder.Append(

" in my app!")

 

 

fbmlBuilder.Append("<img src=""" + fbApplication.Service.UserID..SmallPictureUrl + """ alt=""" + fbUser.Name + """ title=""" + fbUser.Name + """ />")

 

 

fbmlBuilder.Append(" Testing7 --- </div>")

 

 

Return fbmlBuilder.ToString()

 

 

End Function

 

 

 




Thanks
Joseph.
Oct 22, 2008 at 7:10 AM
Please refer to my post here http://www.codeplex.com/FacebookNET/Thread/View.aspx?ThreadId=38235
facebook has changed the methods and cause the components not working as expected