Hi,
I cannot seem to get the first image attached on the thread to pull as the image on a facebook post.
Below is the code I have entered in the "Thread_view" can you tell me where I am going wrong.
I cannot seem to get the first image attached on the thread to pull as the image on a facebook post.
Below is the code I have entered in the "Thread_view" can you tell me where I am going wrong.
Code:
<xf:if is="{$thread.FirstPost.Attachments.first().thumbnail_url}">
<xf:macro template="metadata_macros" name="metadata"
arg-siteName="{$siteName}"
arg-title="{$title}"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-imageUrl="{{ link('canonical:attachments', $thread.FirstPost.Attachments.first()) }}"
arg-twitterCard="summary_large_image"/>
<xf:else/>
<xf:macro template="metadata_macros" name="metadata"
arg-siteName="{$siteName}"
arg-title="{$title}"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-imageUrl="{{ link('canonical:attachments', $thread.FirstPost.Attachments.first()) }}"
arg-twitterCard="summary_large_image"/>
</xf:if>