问题标签 [facebook-debugger]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
342 浏览

reactjs - 无法识别 ReactJS 应用程序中 shadow-root 内的元素

ReactJS 应用程序不允许在 shadow-root 中找到元素。

我可以在我的 AngularJS 应用程序中使用 /deep/ 访问该元素,但这不适用于 React 应用程序。

在此处输入图像描述

$("#root .px-app-nav")到目前为止,我们能够找到元素

0 投票
1 回答
177 浏览

apache - Facebook Debugger: Change Canonical URL value after Reverse Proxy Rewrite

I've created a simple app that server renders some basic SPA content based on the user agent.

For example, if an AngularJS website link is shared on Facebook i have a Apache rewrite rule to redirect that link to the rendering app. The rendering app then checks the URL that was passed as a query parameter and returns the specified rendered content.

Everything works as expected, but there's a problem with the rendered result. The canonical link showed in the Facebook post is the rendering app's link. Here's what's happening:

Shared Link: www.example.com/the-shared-link

Facebook's post result:

enter image description here

Instead of displaying the shared link (www.example.com/the-shared-link) the rendering app is shown instead (rendering.app.com). But if i click on the Facebook post, it opens the correct website page.

Facebook Debugger result:

enter image description here

All the needed meta tags are added to the rendered result page:

The Apache htaccess rewrite rule:

What am i doing wrong? How can i change the canonical url to the original shared link?

0 投票
1 回答
259 浏览

facebook - Facebook 隐私政策无效,因为我们支持 https

他们说我们必须用 curl 检查我们的隐私政策。我使用 Google 的隐私政策对此进行了测试,以了解 http 与 https 的大惊小怪。我认为问题在于他们没有使用 -L 进行重定向。我该怎么办?

curl http://policies.google.com/privacy什么都不返回

curl https://policies.google.com/privacy 返回完整的隐私政策

curl -L http://policies.google.com/privacy返回完整的隐私政策

0 投票
1 回答
1893 浏览

facebook - 缺少以下必需属性:fb:app_id

我检查并确认我网站中的元标记

Facebook 开发者调试

仍然报错

我该如何解决这个错误?

网址是链接

0 投票
1 回答
228 浏览

facebook - 页面的full_picture参数

我正在使用图形 API 使用参考“pagename?fields=picture”来访问令牌,以便在我的网站上使用我的 Facebook 页面。这是我正在使用的功能;

这用于获取和显示图像和标题和日期;

问题是我在运行时收到此错误;$ursls = ' https://graph.facebook.com/ '.$feed_id.'/?fields=full_picture,picture&access_token="Access Tokken"';

代码和一切都运行良好,并且在 2 个月前就停止了。谁能告诉我为什么 full_picture 是不存在的领域?这是否意味着我们不能再对页面使用 full_picture 参数了?任何帮助表示赞赏!:)

0 投票
1 回答
779 浏览

reactjs - 如何将元标记包含到必须等待 API 调用的 React SSR 路由?

我有一个服务器渲染的 React 项目,我使用 React-Helmet 使用 Helmet.renderStatic() 从客户端组件获取元标记到服务器。我可以让 facebook 爬虫读取硬编码的元标记,但无法获取依赖于后端 API 响应的元标记以被 facebook 的爬虫读取。我依靠 API 响应来获取标题、描述和关键字等信息来更新我的元标记。我需要能够在 facebook 上分享这些动态页面。有什么建议么?

0 投票
0 回答
1019 浏览

facebook - 使用 facebook graph API 的无效参数错误

我将“ https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html ”作为 facebook 分享的 url以下链接中的调试器:

Facebook 分享调试器

我们可以看到 facebook 抓取的所有结果。如果我们向下滚动并看到 URL 部分下列出的条目,我们会看到一个名为 Scrape API 的条目。如果我们点击它,它会打开带有自动填充字段的图形 API 资源管理器。

它以前工作,但突然停止工作。我得到的错误如下所示:

我在这里想要实现的是获取 facebook 从提供给调试器的 url 中抓取的数据。

编辑1:

如果您使用以下 url 作为测试并按照上述方式执行发布请求。它有效,结果如下:

测试网址: https://www.bloomberg.com/news/articles/2019-01-13/asian-stocks-to-start-mixed-with-earnings-in-focus-markets-wrap?srnd=premium

结果:

有人可以解释为什么其他 url 不能在调试器中工作吗?

0 投票
0 回答
194 浏览

facebook-graph-api - 如何修复 facebook 分享对话框安全检查错误?

我正在尝试从我的网站https://fungen.000webhostapp.com/分享 ma 图像。在我单击共享对话框的“发布到 Facebook”按钮时,它显示带有消息网站链接不安全的警报框,并且还要求输入验证码,如下所示: 在此处输入图像描述

我在互联网上找到了一个答案,建议使用 facebook 对象调试器(https://developers.facebook.com/tools/debug/sharing/)调试我的网站 url 并修复错误。它显示了与 inreferred 和 Missing 属性相关的警告,如下图所示:在此处输入图像描述

因此,由于我的网站网址https://fungen.000webhostapp.com/默认指向 index.php,我将以下元标记添加到我的 index.php 中。一段时间后,我尝试使用相同的 url 进行调试,但它显示的警告与以前相同。

请帮我解决这个问题。

提前致谢。

0 投票
0 回答
3544 浏览

wordpress - WordPress / FB 共享:如何修复无效的图像内容类型错误?

我想在 Facebook 上分享帖子时显示帖子的特色图片,为此,我使用了 All in One SEO插件。

问题是当我在 Facebook Debugger 上调试文章时没有显示文章的图像。

在浏览器property="og:image" :HyYouD3yGwImxH8EHcDoC8lTzQwsp5lly1Htr8ui-1.jpeg中显示为 [scraped][3],但我不明白为什么会出现此错误:

提供的 og:image URL, HyYouD3yGwImxH8EHcDoC8lTzQwsp5lly1Htr8ui-1.jpeg 无法作为图像处理,因为它具有无效的内容类型。

你能帮我解决这个问题吗?

0 投票
2 回答
755 浏览

facebook - Facebook 调试器,Open Graph 图像标签 - Facebook 无法处理托管在 CloudFront 上的某些图像

在 Facebook 调试器中,抓取 URL“ https://www.givingway.com/organization/the-light-and-leadership-initiative ”会产生错误:

损坏的图像

提供 og:image URL,https ://d141thk7ygtt3c.cloudfront.net/043a7261-eb4f-48ce-9db6-8cbeefcf86df.jpg无法作为图像处理。它可能已损坏或格式无效。

同时抓取 URL“ https://www.givingway.com/organization/youth-in-action-against-poverty-and-hivaids-yaapha ”工作正常。

我不知道是什么导致了这个问题,因为两个页面:

  • 两者都是从同一个模板生成的,并且共享相同的 HTML 结构。
  • 有一个 og:image 具有相同的结构。

<meta property="og:image" content="https://d141thk7ygtt3c.cloudfront.net/043a7261-eb4f-48ce-9db6-8cbeefcf86df.jpg" />

<meta property="og:image" content="https://d141thk7ygtt3c.cloudfront.net/b954d1df-57e6-4beb-acae-2916997a8e4e.jpg" />

  • 两张图片都是JPEG。
  • 在单独的选项卡中打开图像 URL 会显示图像 - 这不是我期望的损坏页面的行为。

这种不一致发生在不同的页面上 - 某些页面被成功抓取,而其他页面则没有。