我正在使用Facebook的Graph API,我正在尝试使用以下CURL请求与包含嵌入式swf视频的页面共享链接。
curl -i -X POST \
-d "height=405" \
-d "link=https%3A%2F%2Fbit.ly%2F1SptrHN" \
-d "message=Test" \
-d "name=The%20Last%20Witch%20Hunter" \
-d "picture=https%3A%2F%2Fstatic1.webvideocore.net%2Fi%2Fstores%2F2%2Fitems%2Fbg%2F9%2F9c%2F9ce4632ed7b89b5a36638cdd6392914d.jpg" \
-d "source=https%3A%2F%2Fplay.streamingvideoprovider.com%2Fplayer3.swf%3Fclip_id%3Dar7hgx038sw8%26autoStart%3D1%26native_fs%3D1%26noControls%3D%26repeatVideo%3D%26stretch_video%3D%26brandNW%3D1%26start_img%3D1%26start_volume%3D100%26autoHide%3D1%26skinAlpha%3D80%26colorBase%3D%2523202020%26colorIcon%3D%2523FFFFFF%26colorHighlight%3D%2523fcad37%26viewers_limit%3D0%26cc_position%3Dbottom%26cc_positionOffset%3D70%26cc_multiplier%3D0.03%26cc_textColor%3D%2523ffffff%26cc_textOutlineColor%3D%2523000000%26cc_bkgColor%3D%2523000000%26cc_bkgAlpha%3D0.7" \
-d "type=link" \
-d "width=720" \
-d "access_token=CAAEl5c0JLDABAJpu3DJVbndfcmZCrr9xnk5zoWn5Ik9KEwS14autS1ZAc4ceDdzr4eTIqqzH6z8ePvkZA1gOVUZCKrInECJiFaZCgM1Y0JDocgfyyg9BLSpNzLtMZCOhiPpRPkk0URyCRDedQxQEx3yodXKiyzRJq7RKPZAVKrb77mlxA8fuUvRDZCcGgwgdZAuNZCWnLvtDly8wZDZD" \
"https://graph.facebook.com/v2.0/me/feed"
正如您所看到的,我正在设置picture
并且该图片是公开的。但是,Graph API Explorer会为缩略图返回以下网址,该网址指向swf
。
https://external.xx.fbcdn.net/safe_image.php?d=AQCRoO4J0CcrVO2M&w=130&h=130&url=https%3A%2F%2Fplay.streamingvideoprovider.com%2Fplayer3.swf%3Fclip_id%3Dar7hgx038sw8%26autoStart%3D1%26native_fs%3D1%26noControls%26repeatVideo%26stretch_video%26brandNW%3D1%26start_img%3D1%26start_volume%3D100%26autoHide%3D1%26skinAlpha%3D80%26colorBase%3D%2523202020%26colorIcon%3D%2523FFFFFF%26colorHighlight%3D%2523fcad37%26viewers_limit%3D0%26cc_position%3Dbottom%26cc_positionOffset%3D70%26cc_multiplier%3D0.03%26cc_textColor%3D%2523ffffff%26cc_textOutlineColor%3D%2523000000%26cc_bkgColor%3D%2523000000%26cc_bkgAlpha%3D0.7&cfs=1
此外,手动从页面共享链接会显示正确的缩略图。
错误的缩略图可能是什么原因?
答案 0 :(得分:1)
https://developers.facebook.com/docs/graph-api/reference/v2.6/user/feed#publish列出了通过该端点创建帖子的有效参数。它根本没有提到source
。
虽然它似乎是Feed对话框的有效参数 - 您正在通过API制作帖子,这是不同的。
如果您想与视频分享链接,我建议您通过Open Graph元标记嵌入视频 - https://developers.facebook.com/docs/sharing/webmasters#video