facebook 图 api:理解 offset_y offset_x API

facebook graph api: understanding offset_y offset_x API

您好,我想了解 offset_y 在 facebook 图表中的含义 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.

我已经尝试使用 中的解决方案, 但它确实有效。

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

为了计算这个,我将尝试使用

中的方法

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

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

任何帮助将不胜感激!

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

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

活动创建于

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

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

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

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