我想知道如何检索输入URL时Open Graph Debugger显示的信息。获取Facebook ID对于URL
这里有一个例子:我有一个具有所有正确的OG meta标签页,上面是这样的:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta property="og:url" content="http://www.freefunder.com/campaign/Short-Film-Revenge-Inc/" />
<meta property="og:type" content="Website" />
<meta property="og:title" content="Short Film: "Revenge, Inc."" />
<meta property="og:description" content=""Revenge, Inc." is the first short film for the Karmalicity Movie Project. A feel-good story with a positive message." />
<meta property="og:image" content="http://www.freefunder.com/images/campaigns/2094_main.jpg" />
<meta property="fb:app_id" content="346433602097524" />
当我看到它在打开图形调试器,它给我的代码206并没有错误,并在底部它会给我的网址来看看这个图形API,这是:https://graph.facebook.com/103335396527655
我遇到的问题是我需要能够确定Facebook的ID(103335396527655 )在我的代码中,并且不需要每次都去调试器。如果我去:
http://graph.facebook.com/?ids=http://www.freefunder.com/campaign/Short-Film-Revenge-Inc/
它不返回相同的信息(但不包括该ID),如果我去调试器提供的图形API URL。
给定一个特定的URL,是否有任何方法查找正确的Facebook ID?这可能是图形API,FQL,PHP SDK,无论如何!我只需要能够输入一个URL并获得Facebook ID就可以了。
谢谢!
你在用什么ID?您应该能够在所有API中使用URL来代替ID。 – Igy
基本上我需要能够验证给定的URL是否有Open Graph ID。我需要能够通过查找该URL来确保页面上有一个Like按钮和所有必需的og标签。 –
为什么你需要使用Facebook的API来检查你自己的代码?你不能写一个脚本检查器吗?或者其他的东西?也许我认为这个错误,虽然... – dudewad