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!
With the Facebook Graph API, you can access a wide range of user data, including user information such as name, email address, birthday, and friends list in JSON. You can also access information about pages that a user has liked or engaged with on Facebook, as well as events and photos that they have posted or shared.
The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.
You can access Page Insights by typing /insights after the name of your page in the URL field. This command will retrieve all of the Insights associated with your Page. Type "/insights" after your company name. Click the Submit button.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With