aspnet-starter-kit icon indicating copy to clipboard operation
aspnet-starter-kit copied to clipboard

Add [Login with Facebook] button

Open koistya opened this issue 9 years ago • 1 comments

  • [ ] Create /client/components/Button UI component powered by React and MDL
  • [ ] Put <Button>Login with Facebook</Button> in the header (see /client/components/Layout)
  • [ ] Clicking on this button should trigger an HTTP POST request to /login/facebook

koistya avatar Jun 10 '16 11:06 koistya

//html

<asp:Button ID="btnLogin" runat="server" Text="Login with FaceBook" OnClick="Login" /> <asp:Panel ID="pnlFaceBookUser" runat="server" Visible="false">


ID:
UserName:
Name:
Email:

/asp:Panel

//database

using ASPSnippets.FaceBookAPI; using System.Web.Script.Serialization;

public class FaceBookUser { public string Id { get; set; } public string Name { get; set; } public string UserName { get; set; } public string PictureUrl { get; set; } public string Email { get; set; } }

//authentic user using facebook account

protected void Login(object sender, EventArgs e) { FaceBookConnect.Authorize("user_photos,email", Request.Url.AbsoluteUri.Split('?')[0]); }

gobindaakhuli avatar Jun 24 '16 15:06 gobindaakhuli