通过 facebook opengraph api 共享链接

发布于 2024-12-22 18:25:12 字数 373 浏览 2 评论 0原文

我正在使用 facebook opengeaph api 在 facebook 上共享链接。一切正常,但我无法控制共享链接的标题。

在该网站上,我使用了所有 api 参数,但甚至没有发布图像(也没有关于如何为该用户的特定组共享的信息)。

/PROFILE_ID/links 在给定的配置文件参数上发布链接

-> 链接(编码的网址)、消息(纯文本)、图片(编码的网址)、名称(纯文本)、标题(纯文本)、描述(纯文本)

我如上所述填充了每个参数,但只有消息被发布。

从表面上看,它是从网页标题中选取的作为共享标题。

我拥有的是一个桌面应用程序,所以我只能使用开放图休息 API。有没有办法克服这个问题并在链接标题中添加我自己的消息?

Iam using the facebook opengeaph api to share links on facebook. Everything works fine but i couldnt control the title of the link being shared.

From the site i used all api params, but not even the image is getting posted ( and no info on how to share for a specific group for that user).

/PROFILE_ID/links Publish a link on the given profile

params->
link (encoded url), message (plain text), picture (encoded url), name (plain text), caption (plain text) , description (plain text)

I populated every params as above but only the message is getting posted.

From what it looks its picking from the title of the web page as the share heading.

What i have is a desktop app, so i can use only the open graph rest api's. Is there a way to over come this and add my own message in the link heading ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼角的笑意。 2024-12-29 18:25:12

您可以通过标头中的 og:title 元标记或使用标头中的 title 标记来控制链接的标题。前往 https://developers.facebook.com/tools/debug 查看您的页面是否符合您的要求链接到的 HTML 编码正确。

You control the title of the link either by the og:title meta tag in the header or using the title tag in the header. Go to https://developers.facebook.com/tools/debug to see if your pages you're linking to are correctly coding their HTML.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文