Javascript Facebook share dialog with open graph "og:url" not working
Asked Answered
H

0

1

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...

Hyperplasia answered 1/5, 2019 at 0:16 Comment(2)
might be related to this: #55902386 - i assume facebook finally got rid of those action properties.Armelda
ref (1): #55902386 ref (2): #56006696 ref (3): #55871267 ... can anyone share this annonucement from FB?Employ

© 2022 - 2024 — McMap. All rights reserved.