facebook graph api: understanding offset

Hello I am trying to understand what offset_y means in facebooks graph 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.

I have tried using the solution in facebook graph api: offset_y offset_x, but it does work.

for example, this event https://www.facebook.com/events/164312630996898/. The event picture has a css top offset of -3px:

在这里输入图像描述

In order to calculate this, I will attempt to use the method in facebook graph api: offset_y offset_x

The image is 500x622px (when resized to fit), the event image space is 500x262px. 622px-262px = 360px. using the facebook graph API (https://developers.facebook.com/tools/explorer?method=GET&path=164312630996898%3Ffields%3Dcover&version=v2.12) gives an offset-y of 9: 在这里输入图像描述

so 9% of 360px is, 32.4px, but the actual answer should be 3px.

any help would be greatly appreciated!


So I have experimented with this a lot and I am 100% sure the offset_x , offset_y are not properly documented and may not be even sufficient in many cases to even depict the offset

In my case I used two images listed below and did some experiment with different drags

第一张图片

第二张图片

The event was created on

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

事件

And data collected was below for the above 2 images

收集数据

For the 2nd image you can see that whether i kept the image left aligned, right aligned or center aligned the offset were always 0. But the left was still calculated. This means facebook is not share the offset information correctly. It is most probably a bug based on observation from second image.

Also weird thing is the -77 , 177 entries from the first image

抵消

链接地址: http://www.djcxy.com/p/32650.html

上一篇: 使用Facebook Graph API创建组相关事件

下一篇: 脸谱图api:了解抵消