How to implement Sharing Social Media Meta Tags?

phoenix
html
#1

How to correctly implement the Social Media Meta tag with Pheonix framework? I didn’t see anywhere guide for sharing content on the social media platform.
Following things, I have implemented on my own-
job_card.html.eex

<a href="https://www.facebook.com/sharer/sharer.php?u=<%= get_formatted_share_link(@conn, @job_opening, @host, @user) %>"></a>

app.html.eex (I have added same below code in job_card.html.eex but Title and description was not passing to facebook)

<meta property="og:title" content="Testing Job">
<meta property="og:description" content="Testing Job des">

What steps I am missing? Also, I need to pass same things on the Twitter and Linkedin. Your response will be highly appreciable.

#2

use the “debuggers”/validators… NB you also need to cache bust(rescrape) in some of the tools for your experimental changes to show up…

https://developers.facebook.com/tools/debug/

then later on:
https://cards-dev.twitter.com/validator


https://search.google.com/structured-data/testing-tool

2 Likes
#3

Thanks man, these post inspector help me alot.

1 Like