I'm trying to auto-post from my blog to Facebook using Buffer and this plugin (https://straightupcraft.com/craft-plugins/buffer). The addon requires me to create a plugin to do the actual posting to Buffer. This is my first foray into plugins at all. I used his example and got something that works.
However, the question I have is somewhat general. How do I pull an asset from an entry that has been saved to be able to post to the plugin?
This is the relevant portion of the plugin:
$picture = craft()->request->getUrl($entry->blogImage);
craft()->buffer_utils->queueBufferUpdate($updateString, true, $link, $picture, $thumbnail);
Obviously, my asset field name is blogImage
.
Also, and let me know if I need to create a new question for this, how does onBeforeSaveEntry
affect scheduled content? Does/will the plugin run when it's actually saved or when it becomes "live"? If so, is there a workaround for that?
Thanks.
edit: I did reach out directly to the developer but have not had any luck yet and was hoping the question was general enough that someone else might be able to help!