whyisjake / Simple-Instant-Articles-for-Facebook

Add support for Facebook Instant Articles to your WordPress site.
https://wordpress.org/plugins/simple-facebook-instant-articles/
55 stars 19 forks source link

Remove single post endpoint and point feed URLs to canonical URL #34

Closed andfinally closed 8 years ago

andfinally commented 8 years ago

Looking at the FB documentation, it seems the only data FB expects for each post is provided in the <content:encoded> elements of the RSS feed: there's no mention of a special separate FB Instant Article version of each post. Similarly, looking at examples of other feeds, the <link> element just contains the canonical URL leading to the normal version of the post.

I'm trying to figure out why this plugin adds /fb-instant to the URL and sets up a redirect that renders an individual post using its article template. Is it for developers' convenience, so they can review the markup of each Instant Article?

whyisjake commented 8 years ago

Little from column a, and a little from column b. Originally, this was taking some cues from Google's AMP project, where they have a separate endpoint for he content. We should update the feed to point to the canonical url, and not the fb version.

andfinally commented 8 years ago

Great, thanks, that clarifies it. Changing the title of this to fit.

AramZS commented 8 years ago

We can also just add a filter to the endpoint in the __construct statement and some checks in regards to how to handle it. There's an opportunity here to add trackable query vars, which may be useful for analytics purposes. And indeed, some users may want the endpoints for previewing purposes. I don't think we have to remove it entirely.