Title: Function to get opengraph data?
Last modified: April 13, 2023

---

# Function to get opengraph data?

 *  Resolved [fraxinusstudio](https://wordpress.org/support/users/fraxinusstudio/)
 * (@fraxinusstudio)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/function-to-get-opengraph-data/)
 * Hi there,
 * First of all I just wanted to say that I’ve started using Slim SEO for the first
   time recently and it’s great. Suited my use case down to the ground.
 * I’m using some custom code to publish my posts to facebook when I publish a new
   post and I was wondering if there’s a function I can use to get the opengraph
   tag data of a post by using the post ID?
 * Thanks,
 * Ash

Viewing 1 replies (of 1 total)

 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/function-to-get-opengraph-data/#post-16654222)
 * Hi Ash,
 * Unfortunately, we don’t have a public function for this. But you can try a work
   around like this:
 *     ```wp-block-code
       $description = new SlimSEO\MetaTags\Description;
       echo $description->get_singular_value( $post_id );
       ```
   
 * Note: the Open Graph description is the same as the meta description.

Viewing 1 replies (of 1 total)

The topic ‘Function to get opengraph data?’ is closed to new replies.

 * ![](https://ps.w.org/slim-seo/assets/icon.svg?rev=2005049)
 * [Slim SEO - A Fast & Automated SEO Plugin For WordPress](https://wordpress.org/plugins/slim-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/slim-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/slim-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/slim-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/slim-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/slim-seo/reviews/)

## Tags

 * [post](https://wordpress.org/support/topic-tag/post/)
 * [social](https://wordpress.org/support/topic-tag/social/)

 * 1 reply
 * 2 participants
 * Last reply from: [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * Last activity: [2 years, 12 months ago](https://wordpress.org/support/topic/function-to-get-opengraph-data/#post-16654222)
 * Status: resolved