Options for posting using the Facebook API
isVideo
parameter. See the /post endpoint for details.post: ""
.carousel
body parameter.
link
parameter is the URL at the end of the carousel.items
is an array of object containing the following values. Minimum 2 elements and max 10
elements in the items array.picture
- URL of the carousel image.link
- URL when the image is clicked.name
- (optional) Image displayed in each image card.media_urls
with carousel
. If media_urls
is used, carousels
will be ignored.
Please see our Facebook Carousel Guide for more information.
facebookOptions
.
reels
: Set to true
to post the video to Reels. Required if you want to post to Facebook
Reels.title
: The title of the video with a maximum of 255 characters. Over 255 characters will be
truncated. Optional.thumbNail
: The thumbnail (cover image) of the video. The thumbnail should a URL to a JPEG or
PNG file. The thumbnail should be less than 10MB in size. Optional.verifyReelsUrl
field to check the status. Be sure to use the same Profile Key as your original post. Wait until the time in verifyReelsIn
to check the Reel status (10 minutes). If a HTTP error code of 400
is returned, the post failed and you may try the post one more time.post
field, including
mentions, will be ignored.mediaUrls
.
locationId,
which is a Facebook Page ID or Facebook Page name. For example, Facebook page Id of the Guggenheim Museum is 7640348500
or Facebook page name "@guggenheimmuseum"
. Pages must be associated with a physical location.
locationId
(Page Id) with the brand endpoint. Please note that the Page must have a location listed or the locationId will return an error.
Not supported on text posts, images, reels, and stories. Videos are not supported by Meta for location tagging.
targeting
:
ageMin
: Limit the minimum age that can view the posts. Accepted values of 13, 15, 18, 21, or
25. Other ages will be rejected.countries
: Also known as geofencing, you can limit the countries that can view the post. Array
of country codes. The maximum number of countries that can be targeted is
25. If you need to target more than 25 countries, or restrict certain countries, please see Facebook Page Country Restrictions.feedTargeting
:
ageMin
: Limit the minimum age that can view the posts.. Integer value 13 or higher. Default is
0.ageMax
: Limit the maximum age that can view the posts. Integer value 65 or lower.countries
: Also known as geo targeting, you can indicate the countries that should be able to
view the post. Array of country codes.collegeYears
: Target the college graduation age to view the post. Array of integers for
graduation year from college.educationStatuses
: Target the education status to view the post. Array of integers for
targeting based on education level. Use 1
for high school, 2
for undergraduate, and 3
for
alum.genders
: Target the gender to view the post. Array of integers for targeting specific genders.
1
targets all male viewers and 2
females. Default is to target both.relationshipStatuses
: Target the relationship status to view the post. Array of integers for
targeting based on relationship status. Use 1
for single, 2
for ‘in a relationship’, 3
for
married, and 4
for engaged. Default is all types.altText
in the faceBookOptions
object.
mediaUrls
array. The alt text will be applied to each image in order.
title
parameter.
mediaUrls
URL is allowed in the array when posting a Facebook animated GIF.
If the media URL does not end in “.gif” or ”.GIF”, set the isVideo
field to true
.
@page-name
or @[page-id]
https://www.facebook.com/ayrshare-1234567890
then the ID
is 1234567890.https://www.facebook.com/pages/ayrshare/123466789203
then the Page ID is the number at the end, such as 123466789203.
You can test that the Page ID is correct by going to https://facebook.com/page-id
and it will resolve to the Page.
You can also try a 3rd party Facebook Page look up tool, which is not supported by Ayrshare, such as: https://lookup-id.com/
If all other methods fail, you can go to the Facebook page in a browser and view the page source. In Chrome, right click to select “View Source”. Then search for either owning_profile_id
or profile_id
to find the Page ID.
draft
parameter to faceBookOptions
to send the post as a draft. Available for text, images, video, and reels posts.
scheduledPublishDate
parameter to faceBookOptions
to schedule a post time.
link
parameter with URL of the link.
mediaUrls
field is included in the post request, the media will be displayed instead of the link preview.