Action Links are a good way to add an extra call to action (CTA) beside the Link and Share links on Facebook Posts. The actions parameter lets you add a custom link and name to any post on Facebook, whether is a CTA to download a file, or voting in a poll / competition.
Action Links in PHP
The below code demonstrates a simple API call that adds a message with a custom “Search” action to the post. The
link attributes inside of the
actions parameter can be changed to say anything. And you can even add the other feed parameters like
description to customise the post further.
The above code results in a post like:
picture attributes are used to add a link to the post.
The above code results in a share dialog like: