Last post May 31, 2010 06:45 AM by vbodro
Apr 02, 2010 11:48 AM|Peter Smith|LINK
Trying to implement some Facebook stuff (based on this toolkit: http://facebooktoolkit.codeplex.com/Wikipage)
I have this code, (triggered after a user has been validated):
Dim ses As New Facebook.Session.ConnectSession(ConfigurationManager.AppSettings("ApiKey"), ConfigurationManager.AppSettings("Secret"))
Dim ap As New Facebook.Rest.Api(ses)
Dim usr As Facebook.Schema.user = ap.Users.GetInfo(userId)
Dim fullName As String = (usr.first_name & " ") + usr.last_name
But I get this error:
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Line 244: Dim usr As Facebook.Schema.user = ap.Users.GetInfo(userId) <================================error thrown on this line
Line 245: Dim fullName As String = (usr.first_name & " ") + usr.last_name
And Userid does have a value. I also tried it like this:
Dim usr As Facebook.Schema.user = ap.Users.GetInfo(867345654)
But the same error occurs.
Apr 05, 2010 06:46 AM|davidkuchar|LINK
this is a known bug they're working on:
Apr 05, 2010 10:21 AM|vbodro|LINK
Solution is already here couple of days. Just download source of the newest library and compile it on your machine
facebook and facebook.web project, then copy facebook.dll and facebook.web.dll in your project. Here is a link:
Actually I downloaded version 48896, but I believe that it is also integrated in the newest version.
May 31, 2010 06:23 AM|Abhinav Moudgil|LINK
I have integrated facebook with my web application but I am having a problem I can retrive the Name , Image and other information but I also want to get the email address of the
user who has logged in .
Please help me how to do this ..
May 31, 2010 06:45 AM|vbodro|LINK
public partial class Default : System.Web.UI.Page
private ConnectSession connectSession = ConnectSessionFactory.CreateConnectSession();
private Facebook.Rest.Api API = null;
protected void Page_Load(object sender, EventArgs e)
API = new Facebook.Rest.Api(connectSession);
Facebook.Schema.user loggedUser = null;
// get facebook user object
loggedUser = API.Users.GetInfo();
// get user name
string userName = loggedUser.first_name;
ErrorLabel.Visible = true;