How to create Facebook application and get the App ID And App Secret?
Here we show how to create a Facebook application and get the App ID And App Secret. In this example, we are creating a Facebook application for use with our app for Android. But the creation of Facebook applications and connect to the Web site is not much different.
1.) Log in or sign up in Facebook and go to https://developers.facebook.com/
2.) Click -> Add a new App
![How to create Facebook application](1.png?x=1)
3.) Enter "Display Name", "Contact Email" and Press "Create App ID"
![How to create Facebook application](2.png?x=1)
4.) Press "Set Up" for "Facebook Login" item
![How to create Facebook application](3.png?x=1)
5.) Select "Android"
![How to create Facebook application](4.png?x=1)
6.) Click "I already installed the Android SDK"
![How to create Facebook application](5.png?x=1)
7.) In section 3 "Tell Us about Your Android Project": Enter "Package Name", "Default Activity Class Name" and press "Save" and Press "Continue"
![How to create Facebook application](6.png?x=1)
8.) In section 4 "Add Your Development and Release Key Hashes": You can see how to generate key hashes
Please generate and enter you key hashes, Press "Save" and Press "Continue"
Please generate and enter you key hashes, Press "Save" and Press "Continue"
![How to create Facebook application](7.png?x=1)
9.) In next sections "8. Add the Facebook Login Button", "9. Register a Callback" and "10. Check Login Status" Press "Next" button
10.) Go to Settings->Basic and enter you data information^
![How to create Facebook application](8.png?x=1)
11.) In topbar press slider:
![How to create Facebook application](9.png?x=1)
12.) In dialog box "Make App Public?" Press "Confirm"
![How to create Facebook application](10.png)
13.) Copy you "Facebook App ID" to file "res/values/strings.xml" (Android Project), constant "facebook_app_id" and change constant "fb_login_protocol_scheme"
![How to create Facebook application](11.png)
14.) The "Facebook Login" setting for the Android app is complete. If you use the web version with the application for Facebook (for products: My Social Network, Dating App and QA Chat) - we continue to configure.
Go to section "Facebook Login -> Quickstart" and Click "Web"
Go to section "Facebook Login -> Quickstart" and Click "Web"
![How to create Facebook application](12.png)
15.) Enter "Site URL" and Press "Save", also Press "Continue"
![How to create Facebook application](13.png)
16.) In sections "2. Set Up the Facebook SDK for Javascript", "3. Check Login Status" and "4. Add the Facebook Login Button" Press "Next"
17.) Enter you "Valid OAuth Redirect URIs" and Press "Save Changes".
For Sell and Buy Today project urls: https://mysite.com/facebook/connect and https://mysite.com/facebook/auth
For Dating App and My Social Network project urls: https://mysite.com/facebook/connect and https://mysite.com/facebook/login
For Sell and Buy Today project urls: https://mysite.com/facebook/connect and https://mysite.com/facebook/auth
For Dating App and My Social Network project urls: https://mysite.com/facebook/connect and https://mysite.com/facebook/login
![How to create Facebook application](14.png)
18.) I recommend that you read this Facebook statement
![How to create Facebook application](15.png)
19.) Go to "Settings->Basic". Copy "App ID" and "App Secret" to you "db.inc.php" config file (change constants "FACEBOOK_APP_ID" and "FACEBOOK_APP_SECRET")
![How to create Facebook application](16.png)