소스 검색

docs: rewrite Instagram dev setup section (#5274)

Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
Evgenia Karunus 10 달 전
부모
커밋
8566400736
2개의 변경된 파일19개의 추가작업 그리고 49개의 파일을 삭제
  1. 0 49
      .github/CONTRIBUTING.md
  2. 19 0
      docs/sources/companion-plugins/instagram.mdx

+ 0 - 49
.github/CONTRIBUTING.md

@@ -101,55 +101,6 @@ Authenticates and Uploads from Dropbox through Companion:
 - Companion reports progress to Uppy, as if it were a local upload.
 - Completed!
 
-### Instagram integration
-
-Even though facebook
-[allows using](https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/)
-http://localhost in dev mode, Instagram doesn’t seem to support that, and seems
-to need a publically available domain name with HTTPS. So we will tunnel
-requests to localhost using `ngrok`.
-
-Make sure that you are using a development facebook app at
-<https://developers.facebook.com/apps>
-
-Go to “Instagram Basic Display” and find `Instagram App ID` and
-`Instagram App Secret`. Put them in a file called `.env` in the repo root:
-
-    COMPANION_INSTAGRAM_KEY="Instagram App ID"
-    COMPANION_INSTAGRAM_SECRET="Instagram App Secret"
-
-**Note!** `ngrok` seems to be blocked by Instagram now, so you may have to find
-an alternative.
-
-Run
-
-```bash
-ngrok http 3020
-```
-
-Note the ngrok https base URL, for example `https://e0c7de09808d.ngrok.io` and
-append `/instagram/redirect` to it, such as:
-
-    https://e0c7de09808d.ngrok.io/instagram/redirect
-
-Add this full ngrok URL to `Valid OAuth Redirect URIs` under
-`Instagram Basic Display`.
-
-Edit `.env` and change to your ngrok URI:
-
-    COMPANION_DOMAIN="e0c7de09808d.ngrok.io"
-    COMPANION_PROTOCOL="https"
-    VITE_COMPANION_URL = 'https://e0c7de09808d.ngrok.io'
-
-Go to: Roles -> Roles -> Add Instagram testers -> Add your instagram account
-
-Go to your instagram account at
-<https://www.instagram.com/accounts/manage_access/>
-
-Tester invites -> Accept
-
-Now you should be able to test the Instagram integration.
-
 ### Requiring files
 
 - If we are `require()`ing a file from the same subpackage, we can freely use

+ 19 - 0
docs/sources/companion-plugins/instagram.mdx

@@ -123,6 +123,25 @@ companion.app({
 });
 ```
 
+### Development
+
+Among Uppy-supported providers, Instagram is the only provider at the time of
+writing that requires https even in dev mode. So, to test your integration in
+development, you need to use some reverse proxy. The easiest way to do it is to
+use [https://redirectmeto.com](https://redirectmeto.com).
+
+In your `.env`, set:
+
+```sh
+COMPANION_DOMAIN="redirectmeto.com/http://localhost:3020"
+COMPANION_PROTOCOL="https"
+```
+
+On
+[https://developers.facebook.com/apps/.../instagram-basic-display/basic-display](https://developers.facebook.com/apps/.../instagram-basic-display/basic-display)
+page, in the “Valid OAuth Redirect URIs” field, add
+`https://redirectmeto.com/http://localhost:3020/instagram/redirect`.
+
 ## API
 
 ### Options