Home facebook graph api: understanding offset_y offset_x API

# facebook graph api: understanding offset_y offset_x API

user6920
1#
user6920 Published in September 20, 2018, 4:47 pm

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!

• could the solution be sitting in the code, because mathematically 3px (2.914px) is 9% of 32.4 which is 9% of 360 ... etc. ? – Hamza Mohamed Mar 3 at 6:44
• Honestly very weird numbers, I tried with 10 different images with somethings the offset varying from -5, 0, 55,63,75, 169 and it still seems cryptic of a calculation to figure out how the calculate this figure – Tarun Lalwani Mar 5 at 16:55