Simple-Instant-Articles-for-Facebook icon indicating copy to clipboard operation
Simple-Instant-Articles-for-Facebook copied to clipboard

Add support for Article Styles

Open whyisjake opened this issue 9 years ago • 9 comments

Thinking that I could set this up as a taxonomy, and then output in the header.

whyisjake avatar Nov 13 '15 00:11 whyisjake

Documentation: https://developers.facebook.com/docs/instant-articles/reference/article

whyisjake avatar Nov 13 '15 00:11 whyisjake

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 ) );
}

mattheu avatar Nov 19 '15 17:11 mattheu

+1 on @mattheu's solution

jetlej avatar Feb 17 '16 15:02 jetlej

Has anyone used custom styles? I can't get it to work...

/cc @chrisackermann & @simonengelhardt

whyisjake avatar Mar 17 '16 23:03 whyisjake

@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):

  1. http://www.buzzfeed.com/jessicaprobus/you-don-t-get-a-win-unless-you-play-in-the-game using their default BuzzFeed style
  2. 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

simonengelhardt avatar Mar 18 '16 13:03 simonengelhardt

I like @mattheu's solution as well.

AramZS avatar Apr 11 '16 19:04 AramZS

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 avatar Apr 13 '16 15:04 AdidasW

@AdidasW That's a good question, and something that we should handle. I'll open a new issue for this.

whyisjake avatar Apr 13 '16 15:04 whyisjake

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

AdidasW avatar Apr 13 '16 15:04 AdidasW