Facebook Open Graph Object 忽略属性
Facebook Open Graph Object ignores attributes
多年来我一直在努力寻找 post 我的页面作为 Facebook 内联视频的解决方案。
我尝试了多次 meta-tags 无济于事(它显示图像缩略图,右侧显示 title/description/website)。
我试过使用 flow player 来尝试使用 og:video:type:application/x-shockwave-flash
,但在尝试共享时再次显示完全相同的结果。
我现在一直在查看 facebook 图 api 以寻找可能的答案。
我以为我在自定义开放图表故事中有一些东西,但我使用的是 API v2.10,它自 2.8 以来已被删除,并且自 10 月以来已从 API 的过去版本中完全删除2017 年,所以这不是解决方案。
然后我查看了 Open Graph Stories Object API。我又一次以为我得到了一些东西,但现在我被卡住了,因为无论我做什么,页面上的示例代码(使用 curl)都不起作用
curl \
-X POST \
"https://graph.facebook.com/app/objects/video.other" \
-F "access_token=APP_TOKEN" \
-F "object={
'description':'This is a description',
'title':'Test Video Object',
'video':'secure_url_to_video_on_AWS\',
'url':'secure_url_to_page_on_my_website'
}"
=> {"id":"OBJECT_ID"}
curl https://graph.facebook.com/OBJECT_ID\?access_token\=\{APP_TOKEN\}
=> {
"created_time":"date",
"title":"Test Video Object",
"type":"video.other",
"id":"OBJECT_ID"
}
当我尝试删除它时出现错误
curl -X DELETE https://graph.facebook.com/OBJECT_ID\?access_token\=\{APP_TOKEN\}
=> {
"error":{
"message":"Unsupported delete request. Object with ID 'OBJECT_ID' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api",
"type":"GraphMethodException",
"code":100,
"error_subcode":33,
"fbtrace_id":"Cbec0ormiGq"
}
}
所以基本上有 3 个问题:
1) 为什么facebook不保存除标题和类型之外的其他属性?
2) Object 显然存在,因为我可以搜索它,所以为什么当我尝试删除它时它说它不存在(使用 object 浏览器的方式相同的结果他们的开发者网站)?
3) 关于如何共享我的页面并使其显示为内联视频有什么想法吗?
感谢您的帮助。
适当的 Open Graph 元标记将是实现此功能的方法 - 但看起来 Facebook 正在逐步淘汰此功能。
这个问题Facebook Open Graph og:video tag for YouTube videos refers to a bug report on the FB developers site, https://developers.facebook.com/bugs/1963535797258090/,他们说,
It looks like this behavior is actually by design.
In our efforts to make News Feed an even more visual and engaging place to connect, we have been introducing new design updates in News Feed beginning in August 2017.
As part of these updates and to provide a consistent experience across desktop and mobile, external video link posts (both paid and organic) on desktop will look and function similar to other link posts. People will now tap on the links to go off of Facebook to watch videos instead of watching within News Feed — mirroring the experience available for such posts on mobile.
不确定所有内容发布者是否会同时发生这种情况。 Facebook 通常会逐步推出此类更新,因此它可能仍然适用于某些人,而您现在可能无法让它对您分享的任何新 pages/articles 起作用。
多年来我一直在努力寻找 post 我的页面作为 Facebook 内联视频的解决方案。
我尝试了多次 meta-tags 无济于事(它显示图像缩略图,右侧显示 title/description/website)。
我试过使用 flow player 来尝试使用 og:video:type:application/x-shockwave-flash
,但在尝试共享时再次显示完全相同的结果。
我现在一直在查看 facebook 图 api 以寻找可能的答案。
我以为我在自定义开放图表故事中有一些东西,但我使用的是 API v2.10,它自 2.8 以来已被删除,并且自 10 月以来已从 API 的过去版本中完全删除2017 年,所以这不是解决方案。
然后我查看了 Open Graph Stories Object API。我又一次以为我得到了一些东西,但现在我被卡住了,因为无论我做什么,页面上的示例代码(使用 curl)都不起作用
curl \
-X POST \
"https://graph.facebook.com/app/objects/video.other" \
-F "access_token=APP_TOKEN" \
-F "object={
'description':'This is a description',
'title':'Test Video Object',
'video':'secure_url_to_video_on_AWS\',
'url':'secure_url_to_page_on_my_website'
}"
=> {"id":"OBJECT_ID"}
curl https://graph.facebook.com/OBJECT_ID\?access_token\=\{APP_TOKEN\}
=> {
"created_time":"date",
"title":"Test Video Object",
"type":"video.other",
"id":"OBJECT_ID"
}
当我尝试删除它时出现错误
curl -X DELETE https://graph.facebook.com/OBJECT_ID\?access_token\=\{APP_TOKEN\}
=> {
"error":{
"message":"Unsupported delete request. Object with ID 'OBJECT_ID' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api",
"type":"GraphMethodException",
"code":100,
"error_subcode":33,
"fbtrace_id":"Cbec0ormiGq"
}
}
所以基本上有 3 个问题:
1) 为什么facebook不保存除标题和类型之外的其他属性?
2) Object 显然存在,因为我可以搜索它,所以为什么当我尝试删除它时它说它不存在(使用 object 浏览器的方式相同的结果他们的开发者网站)?
3) 关于如何共享我的页面并使其显示为内联视频有什么想法吗?
感谢您的帮助。
适当的 Open Graph 元标记将是实现此功能的方法 - 但看起来 Facebook 正在逐步淘汰此功能。
这个问题Facebook Open Graph og:video tag for YouTube videos refers to a bug report on the FB developers site, https://developers.facebook.com/bugs/1963535797258090/,他们说,
It looks like this behavior is actually by design.
In our efforts to make News Feed an even more visual and engaging place to connect, we have been introducing new design updates in News Feed beginning in August 2017.
As part of these updates and to provide a consistent experience across desktop and mobile, external video link posts (both paid and organic) on desktop will look and function similar to other link posts. People will now tap on the links to go off of Facebook to watch videos instead of watching within News Feed — mirroring the experience available for such posts on mobile.
不确定所有内容发布者是否会同时发生这种情况。 Facebook 通常会逐步推出此类更新,因此它可能仍然适用于某些人,而您现在可能无法让它对您分享的任何新 pages/articles 起作用。