加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iphone – *发送到Instagram * * 1 * * 100相机

发布时间:2020-12-14 19:26:50 所属栏目:百科 来源:网络整理
导读:从第一天开始,我被告知每个第三方iOS应用程序都是完美的沙盒,因此第三方应用程序无法将除某些预定义URL之外的消息传输到另一个应用程序. 但这个由100个相机在1中完成的发送到Instagram的技巧引起了我的注意.当用户触发此动作时,他会立即从100个Cameras in 1
从第一天开始,我被告知每个第三方iOS应用程序都是完美的沙盒,因此第三方应用程序无法将除某些预定义URL之外的消息传输到另一个应用程序.

但这个由100个相机在1中完成的发送到Instagram的技巧引起了我的注意.当用户触发此动作时,他会立即从100个Cameras in 1跳到Instagram(这很好,可以通过上面提到的url技巧轻松实现.)然而,有趣的是Instagram会显示刚处理过的图像100相机在1中,好像它是从自己的沙箱中显示图像一样.

据我所知,Cocoa Touch必须有一些API来支持这一点.我的问题是,他们是什么?它们仅限于图像吗?

非常感谢提前.

编辑:我知道有可可触摸URL方案的事情,但如果它是url方案做了诀窍… url方案必须包含图像的指针/引用的信息.否则,即使我们从100个Cameras in 1跳到Instagram,Instagram也无法访问该图像.

编辑(第二次):虽然我还没有尝试过,但Tom H的回答可能最终导致了一个解决方案.所以我接受了他的回答作为最终答案.至于未设置的答案,unset一直提到网址方案的事情(但是老兄,我们都知道.而且不是那些混淆了我们的应用程序之间的切换.这是Instagram从其他应用程序访问该图像的方式让我们感到困惑.)由于未设置的答案并没有提供太多有用的信息,也从未回答过我的问题,我对他的答案进行了低估,我建议那些投票的人相应地调整你的投票. Stack Overflow是一个很棒的地方,因为我们几乎总能得到答案,而不是因为有些人的答案没有错,但从来没有真正到过这一点.

编辑(第3次):The official Instagram developer page现在提供官方解决方案.

If your application creates photos and
you’d like your users to share these
photos using Instagram,you can use
the Document Interaction API to open
your photo in Instagram’s sharing
flow.

You must first save your file in PNG
or JPEG (preferred) format and use the
filename extension “.ig”. Using the
iOS Document Interaction APIs you can
trigger the photo to be opened by
Instagram. The Identifier for our
Document Interaction UTI is
com.instagram.photo,and it conforms
to the public/jpeg and public/png
UTIs. See the Apple documentation
articles: Previewing and Opening Files
and the
UIDocumentInteractionController Class
Reference for more information.

When triggered,Instagram will
immediately present the user with our
filter screen. The image is preloaded
and sized appropriately for Instagram.
Other than using the appropriate image
format,described above,our only
requirement is that the image is at
least 612px tall and/or wide. For best
results,Instagram prefers opening a
JPEG that is 612px by 612px square. If
the image is larger,it will be
resized dynamically.

An important note: If either dimension
of the image is less than 612 pixels,
Instagram will present an alert to the
user saying we were unable to open the
file. It’s our current policy not to
upscale or stretch images to our
minimum dimension.

解决方法

如果有人感兴趣,这里是做这样事情所需的实际文档:

http://instagram.com/developer/iphone-hooks/

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读