Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • kullarmark 2 posts 22 karma points
    Sep 09, 2015 @ 12:19

    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.

    // Initialize the Facebook service (no calls are made here)
                        var service = FacebookService.CreateFromAccessToken(userAccessToken);
                        var user = service.Users.GetUser();

    Any help would be great!




    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()

  • Anders Bjerner 476 posts 2885 karma points MVP 6x admin c-trib
    Sep 09, 2015 @ 12:30
    Anders Bjerner

    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.

  • kullarmark 2 posts 22 karma points
    Sep 09, 2015 @ 13:51

    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?

Please Sign in or register to post replies

Write your reply to: