# 我想将YouTube链接作为原始数据发布

**URL:** https://meta.discourse.org/t/i-want-to-post-youtube-link-as-raw-data/151015
**Category:** Development
**Tags:** rest-api
**Created:** [2020年五月11日 06:13 UTC](https://meta.discourse.org/t/i-want-to-post-youtube-link-as-raw-data/151015 "2020-05-11T06:13:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![neerajsingh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neerajsingh/32/165330_2.png) [@neerajsingh](https://meta.discourse.org/u/neerajsingh)
#### Post date: [2020年五月11日 06:13 UTC](https://meta.discourse.org/t/i-want-to-post-youtube-link-as-raw-data/151015/1 "2020-05-11T06:13:04Z")

</div>

我想以原始数据形式发布 YouTube 链接，但响应为空。如果任何人遇到此类问题，请提供帮助。  
我使用的是 **posts.json** API，并发送如下数据：  
url = … + “posts.json”  
type = post  
raw = “[https://www.youtube.com/watch?v=pIAQV0u72iI](https://www.youtube.com/watch?v=pIAQV0u72iI)”  
topic\_id = 10;

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [2020年五月11日 14:38 UTC](https://meta.discourse.org/t/i-want-to-post-youtube-link-as-raw-data/151015/2 "2020-05-11T14:38:50Z")

</div>

如果您希望 YouTube URL 在前端显示为普通链接（而不是转换为视频单框），可以尝试将 URL 放在反引号内，即发布的原始数据应如下所示：

```plaintext
raw: "`https://youtube.com/video-url`"

```

---

<div class="post-metadata">

### Author: ![neerajsingh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neerajsingh/32/165330_2.png) [@neerajsingh](https://meta.discourse.org/u/neerajsingh)
#### Post date: [2020年五月11日 16:16 UTC](https://meta.discourse.org/t/i-want-to-post-youtube-link-as-raw-data/151015/3 "2020-05-11T16:16:07Z")

</div>

该响应如下：

`https://www.youtube.com/watch?v=pIAQV0u72iI`

但我想以视频类型播放。

---

<div class="post-metadata">

### Author: ![neerajsingh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neerajsingh/32/165330_2.png) [@neerajsingh](https://meta.discourse.org/u/neerajsingh)
#### Post date: [2020年五月12日 05:57 UTC](https://meta.discourse.org/t/i-want-to-post-youtube-link-as-raw-data/151015/4 "2020-05-12T05:57:38Z")

</div>

你好，我想通过 posts.json API 发布 YouTube 链接。发布后，该链接应能直接播放视频。如果可行，请提供帮助。
