Post as HTML Embed from Remote
I'm trying to automate a post from "Publitio" to post video, using the doc from with:
Feed-Related Snippets
Create a new post programatically
You can create a new post programatically using th
$feedData = \[
'title' => 'Post Title',
'message' => 'Post Content', // in markdwon format.
'space_id' => 1, // 1 is the space id
'user_id' => 1, // 1 is the user id
];
// Additional Optional Data attribues
// for youtube or any other embeded video
$feedData\['media']\['url] = '<https://www.youtube.com/watch?v=video_id>'; // youtube video url
$feedData\['media']\['type'] = 'oembed';
$feed = \FluentCommunity\App\Services\FeedsHelper::createFeed($feedData); // this will return $feed Model or \WP_Error
if(is_wp_error($feed)) {
// it's an error
} else {
// it's a success
$createdFeedId = $feed->id;
$permalink = $feed->getPermalink(); // full url of the feed
}
However I need to be posted like pasting the code here, (attached image)
to paste like his script:
<div><div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;"><figure style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%; margin-block-end: 0; margin-block-start: 0; margin-inline-start: 0; margin-inline-end: 0;" ><iframe id="pv_7βdβgf0tJ" src="https://media.publit.io/file/Recording.html?player=1" scrolling="no" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute; overflow:hidden;" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" ></iframe></figure></div></div>
I developed a plugin to post it following the FC documentation, I just need to figure out how to paste the code in Personalised HTML, thanks!
Shahjahan JewelΒ is it possible to automate the post? I tried in all possibly ways I know but I can't replicate the
\
on my automated posts, it always end up like:
div class="feedmediaextvideo">\ An this appear blank on my site. When using the embed option it generates a link to open the video in a new window which is not what I'm looking to protect the content. Is there any specific coding to embed in a post a video player? thanks Attach image due to missing code in the post