Javascript Facebook share dialog with open graph “og:url” not working

I am currently using the javascript Facebook share dialog API version 3.2 as follows:

FB.ui(
  {
        method: "share_open_graph",
        action_type: "og.likes",
        action_properties: {
            object: {
                "og:title": "Test Title",
                "og:description": "Test description here",
                "og:image": "https://url-to-image-here",
                "og:url": "https://google.com"
            }
        }
    },
    (fbResponse: any) => {
        // handle response here.
    }
);

When i include the og:url with a non-empty value, I keep getting the following response when the dialog loads regardless of the url I use:

Facebook response with og:url defined

If I do not define the og:url or assign it an empty string, the dialog loads and shows a preview of the post as expected. However, when I complete the post and view it on Facebook, it will not link to my desired url, since I had to exclude it to make it work.

If anyone else has experienced this issue and knows how to resolve it, please let me know. I have been looking around for a solution for days now and I'm all out of ideas...

Answers:

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.