Anybody could suggest how to add meta tags to json?

Hello. I am using API connector for facebook graph api to poast a link on my feed. Anybody could suggest how to incorporate these meta tags. It would allow me to customize link title and description on each post. Many thanks!

<meta property="og:title"              content="When Great Minds Don’t Think Alike" />
<meta property="og:description"        content="How much does culture influence creative thinking?" />

I haven’t looked at the api so i could be way off - probably best not to try this on a live FB account just in case, but give this a go,

	{
		"access_token":"<Access Token>",
		"message":"<Message>",
		"link":"<Link>",
		"og_title":"<Title>",
		"og_description":"<Description>"
	}

or if that does not get it done maybe try,

	{
		"access_token":"<Access Token>",
		"message":"<Message>",
		"link":"<Link>",
		"title":"<Title>",
		"description":"<Description>"
	}

It didn’t worked. But thanks anyway! Still don’t know what is the correct format for adding meta property into json data.

any error message returned? im guessing then the api wants to see this as a seperate object or maybe there is a certain field/param/permission required to create/add the certain object inline with the request. what happens if you remove the message field and POST it? alot of api’s will take a message field as a raw text and assume that the entire content is contained within. where as say content:[{ message parts go here}] in message:value 's place would be the answer. if you get stuck for too long i will take a look at facebook dev site and see if i can help.

no error message. it just posts the link on the feed, but with pre-defined title and description. Basically, those meta tag properties allow to format post content on facebook. I would be very grateful if you could look into it. it’s been over a week I am trying to crack this! There is a section in facebook dev page where it explains shortly. https://developers.facebook.com/docs/sharing/webmasters#markup

ok, facebook have pulled the rug out from under you and even worse they are telling you the rug still exists…

using this,

		{
		"access_token":"<Access Token>",
		"link":"<Link>",
	    "message":"<Message>"
	    }

you will be able to post the link with a message text above the snipit. BUT as for renaming the link snippet’s title, description, image and so on,

i have to say though I agree with this move, although thats not going to help you.

I would look into maybe seeing what if any markup/formatting options are available and formatting the message with an image and an action or something.

Perhaps a spare page on your app make the height & width nice and small, make it look like the snippet you want, give it the title and description you prefer and make it so when the page has param fbreferral=true go to page index, then just post the link to your new page with the param ?fbreferral=true and bingo.

1 Like

Thank you for the detailed reply, jarrad! I will definitely will look into your solution! :wink: