Streaming live at 10am (PST)

Set Open Graph settings via custom code


#1

I have a web page that takes parameters via the URL to create custom page content. This URL will likely be shared on social media and I'd like the custom page content to be reflected in the post.

How do I go about setting the Open Graph settings in the custom code?


#2

Do you have something to show us?


#3

Yep here you go

The text parameter is "test" and the image parameter is... well you see it lol.

I'd like for my Open Graph title to be the text parameter and the Open Graph image url to be my image parameter but I can only edit them in the page settings it seems.


#4

Hmm, doesn't seem to be possible with JavaScript, as the tags have to be written on the server side.

http://stackoverflow.com/q/3081004/584192

However, you might be able to use different share links for each social media like these:

http://stackoverflow.com/a/34178987/584192


#5

Ah ok thanks. Think I might have to learn php for this one :sweat_smile: