About a week ago (Sep 13) Facebook presented the new post-link format (which looks much more like the photo-post - larger image, etc). However, when I upload posts through API (which worked perfectly), I still get posts that look like the old format (while image is cut to a small square) although Facebook-interfaces (direct Facebook ads-creator ; Power-Editor) generate new-format posts as needed.
I did not see any documentation about the new format (this page: https://developers.facebook.com/docs/reference/api/page/#links was updated 3 weeks ago). Also, I was not able to easily sniff the power-editor actions and look for API-differences, if such exists.
Will appreciate any idea. Thanks.
A generic link ad following the specs here can be created with the following parameters:
title=My Link Ad Creative
body=Click Here To Learn More
object_url=http://example.com
image_hash=FfabEOIJWF898203fPOIEJfe0f93f0
and posted to the graph API. It will create a smaller, column-like side-bar link ad with only two fields of text—I think that's the "old format...small square" version you're referencing.
To create the newsfeed-like, larger-photo link ad like you're looking for, you'll need to use the new object_story_spec parameter and include a valid object story spec so that the link ad (which is really a page post) can be created on the fly and associated with your creative.
An object story spec should contain a page_id -- so that the "post" can be created and have a page author and for a link_ad, it should have a link_data field that contains a JSON object of parameters like message, link, name, caption, description, image_hash and so on. The details can be found here if you click on object_story_spec from the known fields table and then click the "link_ad" dropdown. Your final object would look like this:
params = {
page_id: 1111111111,
link_data: {
link: 'example.com',
message: 'The main text below the image',
name: 'The text at the top of the image'
description: 'the text below the message',
image_hash: 'a previously uploaded image hash'
}
And your post request to create the creative would have the fields:
name=My Link Ad Creative
object_story_spec={JSON.stringify(params)}
where params are json-encoded.
Make sense?
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