# SNS 공유

## 텍스트, URL 공유

텍스트 또는 링크 입력 후 사용 중인 앱을 선택하여 공유합니다.&#x20;

```dart
SnsShare().shareWithSns(
                  title: 'Example title',
                  text: textValue,
                  url: urlValue,
                  chooserTitle: 'Example chooser title',
                );
```

## 로컬 파일 공유

로컬 파일 선택 후 사용 중인 앱을 선택하여 공유합니다.&#x20;

```dart
FilePickerResult? result = await FilePicker.platform.pickFiles();

if (result != null) {
  File file = File(result.files.single.path!);
  SnsShare().shareLocalFile(
    title: 'Example local file share',
    path: file.toString(),
    text: 'Example local file share text',
   );
```

## 카카오톡 피드 공유

카카오톡 앱(설치 시) 또는 웹(미설치 시)으로 공유합니다.

```dart
SnsShare().shareWithKakaoTalk(feedTemplate: defaultFeed);
```

## 카카오스토리 사진 포스팅&#x20;

카카오스토리로 사진을 포스팅 합니다.&#x20;

<pre class="language-dart"><code class="lang-dart"><strong>SnsShare().shareWithKakaoStory(
</strong>                  byteData: await rootBundle.load('assets/jpg/photo.jpeg'),
                  tempFile: File(
                      '${(await getTemporaryDirectory()).path}/photo.jpeg'),
                  content: 'Posting photo from Kakao SDK Sample.',
                );
</code></pre>

## 페이스북 스토리 공유

로컬 사진 선택 후 페이스북 스토리로 공유합니다.&#x20;

```dart
SnsShare().shareWithFacebookStory();
```

## 인스타그램 스토리 공유

로컬 사진 선택 후 인스타그램 스토리로 공유합니다.&#x20;

```dart
SnsShare().shareWithInstagramStory();
```

## 트위터 공유

트위터 앱(설치 시) 또는 웹(미설치 시)으로 공유합니다.&#x20;

```dart
SnsShare().shareWithTwitter(text: textValue!);
```

## SMS 전송

텍스트 또는 링크를 문자로 전송합니다.&#x20;

```dart
SnsShare().shareWithSms(text: textValue!);
```

## 클립보드 복사

텍스트 또는 링크를 복사합니다.&#x20;

```dart
SnsShare().copyToClipboard(text: textValue!);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.aliothx.net/start/option/index/sns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
