I am developing a website with ASP .NET MVC 5 and am new to .NET MVC. On that website I have to display the users Timeline images. As of now, I am login with OWIN and accessing the images using JavaScript API. Is there way to get the user images using ASP.NET MVC 5 without using JavaScript?.

var x = new FacebookAuthenticationOptions();
        x.AppId = "*";
        x.AppSecret = "**";
        x.Provider = new FacebookAuthenticationProvider()
            OnAuthenticated = async context =>
                context.Identity.AddClaim(new System.Security.Claims.Claim("FacebookAccessToken", context.AccessToken));
                foreach (var claim in context.User)
                    var claimType = string.Format("urn:facebook:{0}", claim.Key);
                    string claimValue = claim.Value.ToString();
                    if (!context.Identity.HasClaim(claimType, claimValue))
                        context.Identity.AddClaim(new System.Security.Claims.Claim(claimType, claimValue, "XmlSchemaString", "Facebook"));



        x.SignInAsAuthenticationType = DefaultAuthenticationTypes.ExternalCookie;

The same as done using Facebook canvas. But, I need for website. Please let me know the way is correct. Thanks in advance.

Related posts

Recent Viewed