-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2283650
commit 6ad9bf7
Showing
41 changed files
with
9,329 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
slug: first-blog-post | ||
title: First Blog Post | ||
authors: | ||
name: Gao Wei | ||
title: Docusaurus Core Team | ||
url: https://github.com/wgao19 | ||
image_url: https://github.com/wgao19.png | ||
tags: [hola, docusaurus] | ||
--- | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
slug: long-blog-post | ||
title: Long Blog Post | ||
authors: endi | ||
tags: [hello, docusaurus] | ||
--- | ||
|
||
This is the summary of a very long blog post, | ||
|
||
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view. | ||
|
||
<!--truncate--> | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
slug: mdx-blog-post | ||
title: MDX Blog Post | ||
authors: [slorber] | ||
tags: [docusaurus] | ||
--- | ||
|
||
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/). | ||
|
||
:::tip | ||
|
||
Use the power of React to create interactive blog posts. | ||
|
||
```js | ||
<button onClick={() => alert('button clicked!')}>Click me!</button> | ||
``` | ||
|
||
<button onClick={() => alert('button clicked!')}>Click me!</button> | ||
|
||
::: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
slug: welcome | ||
title: Welcome | ||
authors: [slorber, yangshun] | ||
tags: [facebook, hello, docusaurus] | ||
--- | ||
|
||
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog). | ||
|
||
Simply add Markdown files (or folders) to the `blog` directory. | ||
|
||
Regular blog authors can be added to `authors.yml`. | ||
|
||
The blog post date can be extracted from filenames, such as: | ||
|
||
- `2019-05-30-welcome.md` | ||
- `2019-05-30-welcome/index.md` | ||
|
||
A blog post folder can be convenient to co-locate blog post images: | ||
|
||
![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg) | ||
|
||
The blog supports tags as well! | ||
|
||
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
endi: | ||
name: Endilie Yacop Sucipto | ||
title: Maintainer of Docusaurus | ||
url: https://github.com/endiliey | ||
image_url: https://github.com/endiliey.png | ||
|
||
yangshun: | ||
name: Yangshun Tay | ||
title: Front End Engineer @ Facebook | ||
url: https://github.com/yangshun | ||
image_url: https://github.com/yangshun.png | ||
|
||
slorber: | ||
name: Sébastien Lorber | ||
title: Docusaurus maintainer | ||
url: https://sebastienlorber.com | ||
image_url: https://github.com/slorber.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# Android configuration | ||
|
||
|
||
:::danger IMPORTANT | ||
When you install this plugin you need to configure the plugin on Android before run the project again . If you don't do it you will have a **No implementation found** error because the facebook SDK on Android throws an Exception when the configuration is not defined yet and this locks the other plugins in your project. If you don't need the plugin yet please remove or comment it. | ||
::: | ||
|
||
|
||
|
||
Go to [Facebook Login for Android - Quickstart](https://developers.facebook.com/docs/facebook-login/android/?locale=en) | ||
|
||
1. Select an App or Create a New App | ||
|
||
<img src="https://user-images.githubusercontent.com/15864336/98711287-cedfdc80-2352-11eb-9eb3-761f43ba4f7e.png" /> | ||
|
||
2. Skip the step 2 (Download the Facebook App) | ||
|
||
3. Skip the step 3 (Integrate the Facebook SDK) | ||
|
||
4. Edit **Your Resources and Manifest** add this config in your android project | ||
|
||
- Open your `/android/app/src/main/res/values/strings.xml` file, or create one if it doesn't exists. | ||
- Add the following (replace `{your-app-id}` with your facebook app Id): | ||
|
||
```xml | ||
<string name="facebook_app_id">{your-app-id}</string> | ||
<string name="fb_login_protocol_scheme">fb{your-app-id}</string> | ||
``` | ||
|
||
Here one example of `strings.xml` | ||
|
||
```xml | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">Flutter Facebook Auth Example</string> | ||
<string name="facebook_app_id">1365719610250300</string> | ||
<string name="fb_login_protocol_scheme">fb1365719610250300</string> | ||
</resources> | ||
``` | ||
|
||
- Open the `/android/app/src/main/AndroidManifest.xml` file. | ||
- Add the following uses-permission element after the application element | ||
|
||
```xml | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
``` | ||
|
||
- Add the following meta-data element, an activity for Facebook, and an activity and intent filter for Chrome Custom Tabs inside your application element | ||
|
||
```xml | ||
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> | ||
|
||
<activity android:name="com.facebook.FacebookActivity" | ||
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" | ||
android:label="@string/app_name" /> | ||
<activity | ||
android:name="com.facebook.CustomTabActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.BROWSABLE" /> | ||
<data android:scheme="@string/fb_login_protocol_scheme" /> | ||
</intent-filter> | ||
</activity> | ||
``` | ||
|
||
Here one example of `AndroidManifest.xml` | ||
```xml | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="app.meedu.flutter_facebook_auth_example"> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<application | ||
android:name="io.flutter.app.FlutterApplication" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="facebook auth"> | ||
|
||
<meta-data | ||
android:name="com.facebook.sdk.ApplicationId" | ||
android:value="@string/facebook_app_id" /> | ||
<activity | ||
android:name="com.facebook.FacebookActivity" | ||
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" | ||
android:label="@string/app_name" /> | ||
<activity | ||
android:name="com.facebook.CustomTabActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.BROWSABLE" /> | ||
|
||
<data android:scheme="@string/fb_login_protocol_scheme" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".MainActivity" | ||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||
android:hardwareAccelerated="true" | ||
android:launchMode="singleTop" | ||
android:theme="@style/LaunchTheme" | ||
android:windowSoftInputMode="adjustResize"> | ||
<meta-data | ||
android:name="io.flutter.embedding.android.NormalTheme" | ||
android:resource="@style/NormalTheme" /> | ||
<meta-data | ||
android:name="io.flutter.embedding.android.SplashScreenDrawable" | ||
android:resource="@drawable/launch_background" /> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<meta-data | ||
android:name="flutterEmbedding" | ||
android:value="2" /> | ||
</application> | ||
</manifest> | ||
``` | ||
|
||
|
||
|
||
5. Associate Your Package Name and Default Class with Your App | ||
|
||
<img src="https://user-images.githubusercontent.com/15864336/98712455-54b05780-2354-11eb-9509-aa2846af1a2d.png" /> | ||
|
||
6. Provide the Development and Release Key Hashes for Your App | ||
|
||
<img src="https://user-images.githubusercontent.com/15864336/98712555-73aee980-2354-11eb-9c25-c1ef3760fce1.png" /> | ||
|
||
To find info to how to generate you key hash go to https://developers.facebook.com/docs/facebook-login/android?locale=en_US#6--provide-the-development-and-release-key-hashes-for-your-app | ||
|
||
> Note: if your application uses [Google Play App Signing](https://support.google.com/googleplay/android-developer/answer/9842756?visit_id=637406280862877202-1623101210&rd=1) then you should get certificate SHA-1 fingerprint from Google Play Console and convert it to base64 | ||
|
||
> You should add key hashes for every build variants like release, debug, CI/CD, etc. | ||
|
||
|
||
6. Queries | ||
Apps that target Android API 30+ (Android 11+) cannot call Facebook native apps unless the package visibility needs are declared. Please follow https://developers.facebook.com/docs/android/troubleshooting/#faq_267321845055988 to make the declaration. To solve it you have to add in the AndroidManifest.xml file: | ||
|
||
```xml | ||
<manifest package="com.example.app"> | ||
<queries> | ||
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> | ||
</queries> | ||
... | ||
</manifest> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# App Tracking Transparency | ||
|
||
Since **iOS 14.5** all apps that they want to track the user activity to share data across others providers needs to request | ||
the **AppTrackingTransparency** permission. | ||
|
||
If you want to track the user activity after the login process follow the next steps. | ||
|
||
In your `Info.plist` add the `FacebookAutoLogAppEventsEnabled` key only if you don't have it and set the value to `false` | ||
``` | ||
<key>FacebookAutoLogAppEventsEnabled</key> | ||
<false/> | ||
``` | ||
Also if you don't have the `NSUserTrackingUsageDescription` key you need to add it | ||
``` | ||
<key>NSUserTrackingUsageDescription</key> | ||
<string>Your reason, why you want to track the user</string> | ||
``` | ||
|
||
Next you need to ask to the user about the **AppTrackingTransparency** permission. To do that you can use [permission_handler](https://pub.dev/packages/permission_handler) | ||
|
||
```dart | ||
final status = await Permission.appTrackingTransparency.request(); | ||
if (status == PermissionStatus.granted) { | ||
await FacebookAuth.i.autoLogAppEventsEnabled(true); | ||
print("isAutoLogAppEventsEnabled:: ${await FacebookAuth.i.isAutoLogAppEventsEnabled}"); | ||
} | ||
``` | ||
|
||
You can use `FacebookAuth.i.isAutoLogAppEventsEnabled` to check if the AutoLogAppEvents are enabled. | ||
|
||
|
||
> For more info check the example folder. |
Oops, something went wrong.