Kevin Fodness
Forum Replies Created
-
Forum: Plugins
In reply to: [Publish To Apple News] APO / cURL timeout errorDo you have the “Use Remote Images” setting turned on? This error could be caused by trying to send large images to Apple along with the article and the request timing out. Remote images is the preferred method of including images in your article, and is turned on by default on new installations of the plugin.
Forum: Plugins
In reply to: [Publish To Apple News] Video embed does not work Apple NewsHi Mark—
I should have some time to dig in to this more deeply in a few days. Fundamentally, the plugin is looking for a specific HTML signature in order to recognize the block as being a YouTube embed and to extract the URL so it can create an Apple News YouTube embed component, and I believe that the modifications to the HTML that are caused by FitVids are contributing to this problem.
Forum: Plugins
In reply to: [Publish To Apple News] Way to skip publishing a category?We actually added a feature to manage this right from the Apple News settings, and it will ship with the next version of the plugin. If you need it right away, you can use the filter above, but if you can wait a few weeks, there will be more direct support for this use case in the plugin.
Forum: Plugins
In reply to: [Publish To Apple News] Unable to connect to Apple NewsI also added a detailed explanation of how to work with .papi files on our wiki: https://github.com/alleyinteractive/apple-news/wiki/Configuration#api-settings
Let me know if you are still having trouble connecting.
Forum: Plugins
In reply to: [Publish To Apple News] Where is the “Configuration File”?The
.papi
file is just a text file, so saving it aspapi.txt
(plain text option, not rich text) and renaming it to.papi
is fine. Alternately, like you said, you can just paste the contents into the text box rather than attempting to upload the file.Saving it as rich text (.rtf) and renaming it won’t work, because rich text format contains extra information beyond what a plain text file does, and you’re right that the system won’t like that.
Within TextEdit, to convert from rich text to plain text, go to the Format menu and select Make Plain Text.
Forum: Reviews
In reply to: [Publish To Apple News] Doesn;t support multiple Post TypeThe post type selection box is a standard multi-select, so you need to hold down control (on Windows) or command (on Mac) to select multiple post types.
More information here: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple#select
Forum: Plugins
In reply to: [Publish To Apple News] Where is the “Configuration File”?I’m glad you were able to get it connected. I added a new section to our wiki with details on how to configure the
.papi
file, in case there are others who have similar issues: https://github.com/alleyinteractive/apple-news/wiki/configuration#api-settingsIf you look at the part of that message that says
body
, there is anerrors
object that explains what went wrong. The issue is that you have a URL that starts with a hash (#
), which means nothing to the Apple News API, since it’s a reference to another section on the article, and it can’t resolve the URL properly. You will either need to remove the URL that includes the hash, or you will need to use a filter to find and update the URL to include the URL of the article itself (e.g., convert from#my-section
tohttps://example.com/articles/my-article#my-section
).We sometimes see this error crop up when there is a share tool that is included in the article body, since sharing tools typically use hash-based URLs.
Some filters that might be applicable here:
apple_news_exporter_content_pre
: https://github.com/alleyinteractive/apple-news/wiki/Filter:-apple_news_exporter_content_preapple_news_generate_json
: https://github.com/alleyinteractive/apple-news/wiki/Filter:-apple_news_generate_jsonI know you mentioned that you’re not a coder, so you will likely need to secure the services of a developer in order to use these filters. The plugin is able to handle most common use cases, but it’s not possible to handle all third party plugin and theme customizations out there, which is why we make filters available so that developers can customize the content that is sent to Apple and handle situations such as this.
- This reply was modified 3 years, 6 months ago by Kevin Fodness. Reason: typo
- This reply was modified 3 years, 6 months ago by Kevin Fodness. Reason: formatting
Forum: Plugins
In reply to: [Publish To Apple News] Where is the “Configuration File”?Hi @cloudninecreative –
Yes, that’s correct, the plugin now uses Apple’s preferred method of specifying API credentials, which is the .papi file. If you had previously connected to the API by entering your channel ID, key, and secret, those values are still saved in the database. If you see a menu option for Sections, you can click on that, and if you see a list of your Apple News sections, then the API connection is successful.
If not, you will need to create and upload a .papi file, or enter the contents of the file manually. There is a link on the Settings screen (the one that says “the Apple News API documentation”) – if you click that it takes you here: https://developer.apple.com/documentation/apple_news/apple_news_api/getting_ready_to_publish_and_manage_your_articles
On that page, scroll to the section labeled Get the Apple News API and click on the link that says Apple News API Client Utility. Unpack it and it has instructions on how to create your .papi file and verify it by running commands against the API using the CLI utility. Once you have verified that your .papi file is correct and that you can access the API with the credentials, you can upload it to your WordPress site via the Apple News Settings screen.
Basically, this process ensures that your channel ID, key, and secret are properly configured to access Apple’s API before attempting to hook up your WordPress site.
Has Apple approved your channel? If Apple has not yet approved your channel, then it would make sense that it’s not visible in the app. You will need to follow up with Apple about this.
What happens when you visit the article URL directly? It is available in the article view, under the Apple News box, in Publish Information, under the Share URL heading. You should be able to open that URL in the News app and see your article contents. If you can’t view the article on the News app, then you will need to follow up with Apple, as their API has reported success (the LIVE status comes from Apple’s API).
Forum: Plugins
In reply to: [Publish To Apple News] Unable to connect to Apple NewsThere is an example of the .papi file’s contents in the README file contained in the Apple News API Client Utility ZIP archive. If you follow that example, and you correctly enter your channel ID, key, and secret, it should be able to connect. There were a few other threads asking for help with .papi files, which you may find useful:
https://github.com/alleyinteractive/apple-news/issues/875
https://github.com/alleyinteractive/apple-news/issues/609
If you’re still having trouble getting the client utility to work, please reach out to Apple support for help. Once you are able to successfully connect via the client utility, you can upload your .papi file to the Publish to Apple News settings screen on your WordPress site, and it will be able to successfully connect to Apple.
Forum: Plugins
In reply to: [Publish To Apple News] Way to skip publishing a category?There’s a filter for that: https://github.com/alleyinteractive/apple-news/wiki/Filter:-apple_news_skip_push
Forum: Plugins
In reply to: [Publish To Apple News] Example papi file, On A Windows PCThanks, @cm3solutions – I think the line breaks got eaten by the editor, but yes, that is the correct format. At an absolute minimum, it needs:
channel_id: xxxx key: xxxx secret: xxxx
The comment at the top and the endpoint field aren’t used by the Publish to Apple News plugin, although I believe the endpoint field is used by the CLI utility, so should be present if you’re testing it locally via CLI.
Forum: Plugins
In reply to: [Publish To Apple News] Unable to connect to Apple NewsOn the Apple News > Settings screen, there is a link to the Apple News API documentation. If you click on that link (which takes you here: https://developer.apple.com/documentation/apple_news/apple_news_api/getting_ready_to_publish_and_manage_your_articles) there is a link to download the Apple News API Client Utility. You should be able to follow the instructions in the README included with the utility, which includes a command to run to verify your .papi file. If the CLI utility is able to confirm your .papi file is created correctly, then it should work in the plugin when you upload it.
Forum: Plugins
In reply to: [Publish To Apple News] Issue with last update & custom post typesGreat – glad we got it resolved!
Forum: Plugins
In reply to: [Publish To Apple News] Issue with last update & custom post typesSpecifically, when you call
register_post_type
and specify arguments (second parameter), under thesupports
key, you need to includecustom-fields
. For example:register_post_type( 'my-post-type', [ 'show_in_rest' => true, // Required for Gutenberg. 'supports' => [ 'author', 'custom-fields', 'editor', 'excerpt', 'revisions', 'thumbnail', 'title' ], // This is a pretty reasonable set of supports, and must include custom-fields for postmeta. ] );