Open Graph metadata
page.usesTitleAsOpenGraphTitle()
Checks if the page uses the page title as the Open Graph title.
Syntax
Returns
Promise<boolean
>
A Promise that resolves to a boolean
value.
Example
Designer Ability
page.useTitleAsOpenGraphTitle(use)
Indicate whether the page should use its title as the Open Graph (OG) title.
Syntax
Parameters
- use:
boolean
- Set to true to use the page title as the OG title, false otherwise.
Returns
Promise<null
>
A Promise that returns to null
Example
Designer Ability
page.getOpenGraphTitle()
Retrieves the Open Graph title of the page.
Syntax
Returns
Promise<string
>
A Promise that resolves to a string
with the Open Graph title of the page.
Example
Designer Ability
page.setOpenGraphTitle(title)
Sets the Open Graph (OG) title of the page to the provided value.
Syntax
Parameters
- title:
string
- The new OG title to set for the page.
Returns
Promise<null
>
A Promise that returns to null
.
Example
Designer Ability
page.usesDescriptionAsOpenGraphDescription()
Checks if the page uses its description as the Open Graph description.
Syntax
Returns
Promise<boolean
>
A Promise that resolves to a boolean
value.
Example
Designer Ability
page.useDescriptionAsOgDescription(use)
Indicate whether the page should use its description as the Open Graph description.
Syntax
Parameters
use
:boolean
- Set totrue
to use the page description as the OG description,false
otherwise.
Returns
Promise<null
>
A Promise that resolves to null
when the Open Graph description is set.
Example
Designer Ability
page.getOpenGraphDescription()
Retrieves the Open Graph description of the page.
Syntax
Returns
Promise<string
>
A Promise that resolves to a string
value of the Open Graph description.
Example
Designer Ability
page.setOpenGraphDescription(description)
Sets the page’s Open Graph description to the provided value.
Syntax
Parameters
- description:
string
- The new OG description to set for the page.
Returns
Promise<null
>
A Promise that resolves to null
when the Open Graph description is set.
Example
Designer Ability
page.getOpenGraphImage()
Retrieves the URL of the Open Graph image associated with the page.
Syntax
Returns
Promise<string
>
A Promise that resolves to a string with the URL of the Open Graph image.
Example
Designer Ability
page.setOpenGraphImage(url)
Sets the URL of the Open Graph image associated with the page.
Syntax
Parameters
- url:
string
- The new URL of the Open Graph image to set for the page.
Returns
Promise<null
>
A Promise that resolves to null
when the Open Graph image is set.