如何使用 Facebook APi 获取 Facebook 广告固定链接
How to get Facebook ad permalink using Facebook APi
使用广告管理器时,您可以预览广告。还有一个 hyperlink 可以 View post permalink with comments。有什么方法可以使用 API
得到 link
首先,您必须获得广告定位的创意。
$ad = new Ad($ad_id);
$ad->read(array(
AdFields::CREATIVE,
));
然后从广告中获取信息。
$creative = new AdCreative($ad->creative['id']);
$creative->read(array(
AdCreativeFields::EFFECTIVE_OBJECT_STORY_ID,
));
然后 $creative->effective_object_story_id
将包含一个类似于 xxxxxxxxxxxxx_yyyyyyyyyyyyy 的 ID,其中 x 是页面的 ID,y 是 post/video/etc 的 ID。
如果你只是去 https://facebook.com/xxxxxxxxxxxxx_yyyyyyyyyyyyy 它应该将你重定向到正确的 post
希望这对某人有所帮助。
使用广告管理器时,您可以预览广告。还有一个 hyperlink 可以 View post permalink with comments。有什么方法可以使用 API
得到 link首先,您必须获得广告定位的创意。
$ad = new Ad($ad_id);
$ad->read(array(
AdFields::CREATIVE,
));
然后从广告中获取信息。
$creative = new AdCreative($ad->creative['id']);
$creative->read(array(
AdCreativeFields::EFFECTIVE_OBJECT_STORY_ID,
));
然后 $creative->effective_object_story_id
将包含一个类似于 xxxxxxxxxxxxx_yyyyyyyyyyyyy 的 ID,其中 x 是页面的 ID,y 是 post/video/etc 的 ID。
如果你只是去 https://facebook.com/xxxxxxxxxxxxx_yyyyyyyyyyyyy 它应该将你重定向到正确的 post
希望这对某人有所帮助。