如何使用 PHP 获得我的广告帐户下所有广告的广告预览。
FB 广告预览插件已弃用(代码如下)
https://developers.facebook.com/docs/marketing-api/ad-preview-plugin/v2.7.
有人可以帮助我创建类似应用程序的代码。
<script>
window.fbAsyncInit = function () {
FB.init({
appId: 'XXXX',
xfbml: true,
version: 'v2.7'
});
};
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div id="fb-root"></div>
<script>
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id))
return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/sdk/xfbml.adpreview.js#xfbml=1&version=v2.7";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
</body>
<div class="fb-ad-preview-deprecated" data-creative="{object_story_id: "19292868552_10151567679603553"}" data-ad-account-id="XXXX" data-ad-format="MOBILE_FEED_STANDARD"></div>
</html>