Skip to content

Commit

Permalink
[Test] #13 - 인스타 앱으로 사진 직접 업로드 부분 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
sayyyho committed Sep 23, 2024
1 parent b23dcb8 commit 59008ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/shareInsta.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const captureAndShare = (element, buttons) => {
useCORS: true, // CORS 문제 해결을 위한 옵션
}).then((canvas) => {
// 캡처된 이미지를 Data URI로 변환
const imageUri = canvas.toDataURL("image/png");
const imageUri = canvas;

// 다운로드 기능 (선택 사항)
const link = document.createElement("a");
Expand All @@ -52,7 +52,7 @@ const captureAndShare = (element, buttons) => {
setTimeout(() => {
console.log(imageUri);
if (isIOS || isAndroid) {
const storyUri = `instagram-stories://share?source_application=your.app.package`;
const storyUri = `instagram-stories://share?source_application=your.app.package&background_image=${imageUri}`;
window.location.href = storyUri;
} else {
// 인스타그램 웹으로 리디렉션
Expand Down

0 comments on commit 59008ec

Please sign in to comment.