Jay*_*old 4 facebook-graph-api facebook-marketing-api
使用广告管理器时,您可以预览广告.还有一个超链接,查看帖子永久链接和评论.有没有办法使用API获取该链接
首先,您必须获得广告定位的广告素材.
$ad = new Ad($ad_id);
$ad->read(array(
AdFields::CREATIVE,
));
Run Code Online (Sandbox Code Playgroud)
然后从广告素材中获取信息.
$creative = new AdCreative($ad->creative['id']);
$creative->read(array(
AdCreativeFields::EFFECTIVE_OBJECT_STORY_ID,
));
Run Code Online (Sandbox Code Playgroud)
然后$creative->effective_object_story_id将包含一个看起来像xxxxxxxxxxxxx_yyyyyyyyyyyyy的ID,其中x是页面的ID,y是帖子/视频/等的id.如果你只是去https://facebook.com/xxxxxxxxxxxxx_yyyyyyyyyyyyy它应该重定向到正确的帖子
希望这有助于某人.
| 归档时间: |
|
| 查看次数: |
1755 次 |
| 最近记录: |