-
Notifications
You must be signed in to change notification settings - Fork 209
Facebook Integration
Ingo edited this page Apr 18, 2021
·
11 revisions
To Enable Facebook Single Sign On Integration in YAF.NET (3.0.0.0 or higher is required)...
- You need to Enable Enable Single Sign On in the Host Settings of your Forum.
- And you need an Facebook Application for your website.
Everything you need to know can be found on the Facebook Developer Portal (Of Course you need an Facebook Account)
- Go to Facebook for Developers dashboard
- Click My Apps and select your App from the dropdown (If you haven't already created any app select Add a New App to create a new app)
- Go to App Setting > Basic Tab -> Contact Email (Fill the email id you want your app to sync with) and then click Add Platform at bottom section,
- Select Website and the add the website to log in as the Site URL(e.g. mywebsite.com)
- Then you can add App Domains which I set to our website's base domain (e.g. for a URL like http://www.mycoolwebsite.com, just use mycoolwebsite.com). If you are testing in local, you can even just give the localhost URL of your app. eg. http://localhost:8080/myfbsampleapp
- At the bottom right - click Save Changes
- Make sure you have the app ID copied and pasted correctly into your code. (The ID is in the first box on that page if you need it again.)
- Goto Settings -> Advanced -> see OAuth Settings area and set Valid OAuth redirect URIs = http://localhost/ , Try doing the following stuff and check if it works out.
- Enable Embedded browser OAuth Login option
- Goto Status & Review -> Status -> Enable options as yes (Make your app visible to public)
- The App ID/App Secret needs to be entered in the app.config in your Forum
<add key="YAF.FacebookAPIKey" value="XXXX" />
<add key="YAF.FacebookSecretKey" value="XXXX" />
When Everything is setup correctly a "Login with Facebook" Button should occur on the login page.
- Users are able to Register/Login with Facebook
YetAnotherForum.NET (YAF) the Open Source Discussion Forum for ASP.NET - https://YetAnotherForum.NET
Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved