To support as many screen sizes as possible, design your app layouts to be responsive and adaptive. Inject Facebook plugin in the constructor add Facebook Connect method to check if the user is logged in.Support for different screen sizes gives your app access to the greatest number of users and widest variety of devices. import from variables to check if the user logged in and holds user data before the constructor. #CHANGE TESTVIEW ANDROID CORDOVA PLUGIN INSTALL#npm install -save open and edit `src/app/` then add this import of Ionic Native Facebook plugin. `YOUR_APP_ID` is the App ID that you write on previous Facebook setup and `YOUR_APP_NAME` is display name on the Facebook App Dashboard. ionic cordova plugin add cordova-plugin-facebook4 -variable APP_ID="YOUR_APP_ID" -variable APP_NAME="YOUR_APP_NAME" To install Ionic 3 native Facebook plugin, type this command on the terminal or Node command line after stopping running Ionic app by press `Ctrl+C`. Install and Configure Ionic 3 Native Facebook Plugin You will this page if the Ionic 3 app working.ĭon't forget to change App ID by open and edit `config.xml` then change this line. To check to make sure app working, just type this command. Just wait a few minutes because it also installs `npm` modules. That command will create a new Ionic 3 app using the app name `ionic-facebook` and use tabs view template. Type this command to create a new Ionic 3 app. Open the terminal or Node command line then go to your projects folder. Finally, click again the Save Changes button. Now, you get the base64 value that will be copied to Facebook Android app key hashes. Just copy and paste SHA1 value that displayed on the terminal to hex string on that site then click the convert button. We are using these tools for converting it. You just need to convert SHA1 hex to be base64 characters. Issuer: CN=Android Debug, O=Android, C=US keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android To get the key hashes, especially in development build open the terminal or command line then type this command. One more thing for the Android app, it needs key hashes. Click again `Add Platform` on the Settings menu for setup Android App.Ĭhoose Android, fill the Google Package Name then click the Save Changes button. Next, click the `Choose Platform` button.Ĭhoose iOS first then on the iOS wizard scroll down to the bottom to enter iOS bundle ID that will supply on `config.xml` later.Ĭlick next then scroll down and back to App dashboard. Now, you can see App ID and Secret, write it to your notepad. Enter the display name then click `Create App ID` button. Login with your Facebook developers account.Ĭlick `+ Add a New App` button. To setup, a Facebook App and get an App ID/Secret, go to Facebook Developers Dashboard. The following tools, dependencies, modules, and plugin are required for accomplishing this tutorial: Previously, we have done a tutorial of authentication or log in using Google+ and LinkedIn. This step by step tutorial on Login with Ionic 3 and Cordova Native Facebook Connect Plugin will begin with the Facebook setup from Facebook Developers Dashboard. Test Ionic 3 and Facebook App on the Device.Install and Configure Ionic 3 Native Facebook Plugin.Right here we will make the mobile apps development that involves sign in with Facebook much easier a multiplatform. Luckily, Facebook has an API for integrating its authentication mechanism with other web or mobile apps. Almost every web and mobile apps require authentication or login to Facebook.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |