gpt4 book ai didi

Facebook 图形 API : understanding offset_y offset_x API

转载 作者:行者123 更新时间:2023-11-30 05:18:49 24 4
gpt4 key购买 nike

您好,我想了解 offset_y 在 facebooks 图形 API 中的含义 https://developers.facebook.com/docs/graph-api/reference/cover-photo/ .

y_offset: When greater than 0% but less than 100%, the cover photo overflows vertically. The value represents the vertical manual offset (the amount the user dragged the photo vertically to show the part of interest) as a percentage of the offset necessary to make the photo fit the space.

我尝试使用 facebook graph api: offset_y offset_x 中的解决方案,但它确实有效。

例如,这个事件https://www.facebook.com/events/164312630996898/ .事件图片的 css 顶部偏移量为 -3px:

enter image description here

为了计算这个,我将尝试使用 facebook graph api: offset_y offset_x 中的方法

图像为 500x622 像素(调整大小以适合时),事件图像空间为 500x262 像素。 622px-262px = 360px。使用 facebook 图形 API ( https://developers.facebook.com/tools/explorer?method=GET&path=164312630996898%3Ffields%3Dcover&version=v2.12 ) 给出 offset-y 为 9: enter image description here

所以 360px 的 9% 是 32.4px,但实际答案应该是 3px。

如有任何帮助,我们将不胜感激!

最佳答案

所以我对此进行了很多试验,我 100% 确定 offset_xoffset_y 没有正确记录,在许多情况下甚至可能不够描述偏移量

在我的例子中,我使用了下面列出的两张图片,并用不同的拖动方式做了一些实验

First Image

Second Image

事件创建于

https://www.facebook.com/events/901430313369669/

Event

上面两张图片收集的数据如下

Data collected

对于第二张图片,您可以看到无论我将图片保持左对齐、右对齐还是居中对齐,偏移量始终为 0。但是 left 仍然被计算。这意味着 facebook 没有正确共享偏移量信息。根据第二张图片的观察,这很可能是一个错误。

同样奇怪的是第一张图片中的 -77177 条目

Offset

关于Facebook 图形 API : understanding offset_y offset_x API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48734896/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com