Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I fetch the users data from social media using api .and then how to store the users data in my database and how to show it in my project.

HTML
//in my project. facebook link image
<li>
                <a href="~/Account/Login">
          
                    <img src="~/myimages/facebook.png" />
                    <h3 class="cbp-ig-title">Facebook</h3>
                    </a>
</li>


//api for facebook

I created app secret id and secret code

  app.UseFacebookAuthentication(
               appId: "",
               appSecret: "");


What I have tried:

//in my project. facebook link image


  • <img src="~/myimages/facebook.png" />

    Facebook



  • //api for facebook

    I created app secret id and secret code

    app.UseFacebookAuthentication(
    appId: "",
    appSecret: "");
    Posted
    Updated 26-Aug-16 12:48pm

    1 solution

    The below links provide examples for authentication to social media via their respective APIs. If you use the built in Identity framework associate with MVC, the storing to the DB, i believe, is taken care of for you. If you choose not to use the identity framework, then based on the username entered and the token received back from the social media APIs, store that information to a users table in your database.

    Then to show that information in your app, using that token you should be able to get whatever information is allowed from those APIs and display in your application accordingly.

    External Authentication Services with ASP.NET Web API (C#) | The ASP.NET Site[^]

    Cutting Edge - Social Authentication in ASP.NET MVC 4[^]

    Identity Framework

    ASP.NET Identity | The ASP.NET Site[^]

    Introduction to ASP.NET Identity | The ASP.NET Site[^]
     
    Share this answer
     
    v2

    This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



    CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900