Hi, i'm building a facebook login using the Skybrud.Social package but the GetUser method in FacebookService throws exception when trying to get the user.
// Initialize the Facebook service (no calls are made here)
var service = FacebookService.CreateFromAccessToken(userAccessToken);
var user = service.Users.GetUser();
Any help would be great!
Regards
Mattias
Stacktrace:
at Skybrud.Social.SocialUtils.ParseEnum[T](String str, T fallback)
at Skybrud.Social.Facebook.Objects.Users.FacebookUser.Parse(JsonObject obj)
at Skybrud.Social.Facebook.Responses.Users.FacebookUserResponse.ParseResponse(SocialHttpResponse response)
at Limetta.Umbraco.Surface.AccountSurfaceController.CallbackFacebook() in d:\Projects\Lakarmissionen\trunk\src\Limetta.Umbraco\Surface\AccountSurfaceController.cs:line 35
at lambdamethod(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass42.41()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass37.<>cDisplayClass39._49()
What version of Skybrud.Social are you using? If you have installed the Umbraco package, you're probably using an older version of Skybrud.Social (since I haven't had the time to make a new release of the Umbraco package).
Earlier versions of Skybrud.Social had a bug where parsing the JSON of a user would fail if a gender wasn't present. This was fixed in v0.9.4.0.
Yes it was an older version, i first downloaded it from the nuget manager and then tried the umbraco package but the same error and then i found your nuget package on github.
Dont know why i didnt get the latest version from nuget?
service.Users.GetUser() throws exception
Hi, i'm building a facebook login using the Skybrud.Social package but the GetUser method in FacebookService throws exception when trying to get the user.
I also tried your code-example from your controller but the same exception occured. https://github.com/leen3o/Dialogue/blob/5799c78a54bc10fbffbdb34e2d1429f6db602033/Src/Dialogue.Logic/Controllers/OAuthControllers/FacebookOAuthSurfaceController.cs
Any help would be great!
Regards
Mattias
Stacktrace:
at Skybrud.Social.SocialUtils.ParseEnum[T](String str, T fallback) at Skybrud.Social.Facebook.Objects.Users.FacebookUser.Parse(JsonObject obj) at Skybrud.Social.Facebook.Responses.Users.FacebookUserResponse.ParseResponse(SocialHttpResponse response) at Limetta.Umbraco.Surface.AccountSurfaceController.CallbackFacebook() in d:\Projects\Lakarmissionen\trunk\src\Limetta.Umbraco\Surface\AccountSurfaceController.cs:line 35 at lambdamethod(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass42.41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass37.<>cDisplayClass39._49()
Hi Mattias,
What version of Skybrud.Social are you using? If you have installed the Umbraco package, you're probably using an older version of Skybrud.Social (since I haven't had the time to make a new release of the Umbraco package).
Earlier versions of Skybrud.Social had a bug where parsing the JSON of a user would fail if a gender wasn't present. This was fixed in v0.9.4.0.
Hi Anders, Thank you for your fast answer.
Yes it was an older version, i first downloaded it from the nuget manager and then tried the umbraco package but the same error and then i found your nuget package on github.
Dont know why i didnt get the latest version from nuget?
is working on a reply...