Simple-Instant-Articles-for-Facebook
Simple-Instant-Articles-for-Facebook copied to clipboard
Add support for Article Styles
Thinking that I could set this up as a taxonomy, and then output in the header.
Documentation: https://developers.facebook.com/docs/instant-articles/reference/article
We've just set up the default
style in the FB IA admin, so haven't tried to pass it as part of the article.
I don't think a taxonomy would be necessary unless you needed to select different stylesheets on a per-article basis. This may well be required for some sites, but probably not as standard.
Perhaps a filter would be sufficient? This would allow users with more complex requirements to achieve their goals without adding any extra UI.
Something like
$style = apply_filters( 'simple_fb_article_style`, 'default' );
if ( 'default' !== $style ) {
printf( '<meta property="fb:article_style" value="%s"/>', esc_attr( $style ) );
}
+1 on @mattheu's solution
Has anyone used custom styles? I can't get it to work...
/cc @chrisackermann & @simonengelhardt
@whyisjake Custom styles should work and we do have publishers using them. As an example, here are two articles from BuzzFeed with different styles (you can share these as "Only Me" if you want to see them as Instant Articles in the Facebook App):
- http://www.buzzfeed.com/jessicaprobus/you-don-t-get-a-win-unless-you-play-in-the-game using their default BuzzFeed style
- http://www.buzzfeed.com/patricksmith/hidden-victims-of-child-sexual-exploitation-highlighted-by-c using their custom style for BuzzFeed News
There is a little more info on setting up styles here: https://developers.facebook.com/docs/instant-articles/guides/design#style
I like @mattheu's solution as well.
Hi im not a developer but i signed up to instant articles on Facebook and i'm at the stage where you need to verify 50 articles via url and add a facebook meta tag to the header php of the website. I have no idea how to add that without messing everything up. Is their anyway this plugin will automatically verify that issue ?
@AdidasW That's a good question, and something that we should handle. I'll open a new issue for this.
Thank you On Apr 13, 2016 10:50 AM, "Jake Spurlock" [email protected] wrote:
@AdidasW https://github.com/AdidasW That's a good question, and something that we should handle. I'll open a new issue for this.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/whyisjake/Simple-Instant-Articles-for-Facebook/issues/4#issuecomment-209520518