javascript Instagram:从网页分享照片

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17673156/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 09:09:14  来源:igfitidea点击:

Instagram: Share photo from webpage

javascriptinstagram

提问by Akhil Sundar

In my shopping site I had implemented the functionality for 'Login via Instagram' and found it is working well. Now is it possible to share a product image and its description to the user Instagram account or whether Instagram provides any javascript methods just like facebook, twitter, google+ etc.

在我的购物网站中,我实现了“通过 Instagram 登录”的功能,发现它运行良好。现在是否可以将产品图片及其描述分享给用户 Instagram 帐户,或者 Instagram 是否提供任何 javascript 方法,例如 facebook、twitter、google+ 等。

Thanks..

谢谢..

回答by Steven Schobert

The short answer is: No. The only way to post images is through the mobile app.

简短的回答是:不可以。发布图片的唯一方法是通过移动应用程序。

From the Instagram API documentation: http://instagram.com/developer/endpoints/media/

来自 Instagram API 文档:http: //instagram.com/developer/endpoints/media/

At this time, uploading via the API is not possible. We made a conscious choice not to add this for the following reasons:

  • Instagram is about your life on the go – we hope to encourage photos from within the app. However, in the future we may give whitelist access to individual apps on a case by case basis.
  • We want to fight spam & low quality photos. Once we allow uploading from other sources, it's harder to control what comes into the Instagram ecosystem.

All this being said, we're working on ways to ensure users have a consistent and high-quality experience on our platform.

目前无法通过 API 上传。由于以下原因,我们有意识地选择不添加此项:

  • Instagram 是关于您在旅途中的生活——我们希望鼓励您在应用程序中拍摄照片。但是,将来我们可能会根据具体情况向各个应用程序授予白名单访问权限。
  • 我们想要打击垃圾邮件和低质量的照片。一旦我们允许从其他来源上传,就很难控制进入 Instagram 生态系统的内容。

尽管如此,我们正在努力确保用户在我们的平台上获得一致和高质量的体验。

回答by mcont

Uploading on Instagram is possible. Their API provides a media upload endpoint, even if it's not documented.

可以在 Instagram 上传。他们的 API 提供了一个媒体上传端点,即使它没有记录。

POST https://instagram.com/api/v1/media/upload/

Check this code for example https://code.google.com/p/twitubas/source/browse/common/instagram.php

检查此代码,例如https://code.google.com/p/twitubas/source/browse/common/instagram.php

回答by Tom Roggero

UPDATE It is now possible:

更新现在可以:

https://developers.facebook.com/docs/instagram-api/content-publishing

https://developers.facebook.com/docs/instagram-api/content-publishing

The Content Publishing API is a subset of Instagram Graph API endpoints that allow you to publish media objects. Publishing media objects with this API is a two step process — you first create a media object container, then publish the container on your Business Account.

内容发布 API 是 Instagram Graph API 端点的子集,允许您发布媒体对象。使用此 API 发布媒体对象是一个两步过程 - 首先创建一个媒体对象容器,然后在您的企业帐户上发布该容器。

Its worth noting that "The Content Publishing API is in closed beta with Facebook Marketing Partners and Instagram Partners only. We are not accepting new applicants at this time." from https://stackoverflow.com/a/49677468/445887

值得注意的是,“内容发布 API 仅与 Facebook 营销合作伙伴和 Instagram 合作伙伴处于封闭测试阶段。我们目前不接受新申请者。” 来自https://stackoverflow.com/a/49677468/445887

回答by rockthedrop

As of November 17, 2015. This rule has officially changed. Instagram has deprecated the rule against using their API to upload images.

截至 2015 年 11 月 17 日。此规则已正式更改。Instagram 已弃用禁止使用其 API 上传图片的规则。

Good luck.

祝你好运。