shortlist-digital/agreable-apple-news-plugin

This package is abandoned and no longer maintained. No replacement package was suggested.

Wordpress plugin for Shortlist Media.


README

Acceptable Facebook embed links

I think the last example link it a potential bug or old style link since I haven't seen any similar in the database. Whereas, we have to convert the often used photo url.

Source: https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/FacebookPost.html

Run the tests

To run the automated tests you'll need to execute this inside Vagrant if working locally

  1. Change working directory
cd [project location]/app/plugins/agreable-apple-news-plugin
  1. Run behat, it will be located in the parent folder normally
../../../../vendor/bin/behat
If for some reason the plugin does not work check the wordpress permalinks setting is set to custom structure with /%category%/%postname%

To get sections, use this

$base = "https://news-api.apple.com";
$credentials = new Credentials(getenv('APPLE_NEWS_API_KEY'), getenv('APPLE_NEWS_API_SECRET'));
$channel = getenv('APPLE_NEWS_CHANNEL_ID');
$sections = (new Api($base, $credentials))->get_sections($channel);