Topic-icon K2 2.7 Now allows toggling of Social Media meta-tags

Active Subscriptions:

None
GetK2.org - So what's been added, changed or updated in this new release in more detail?

Added option to toggle Open Graph meta tags (in case you wish to use a 3rd party extension for that).
Updated social buttons code for all three providers (Twitter, Facebook & Google+).
The topic has been locked.
Support Specialist
That's good news all around. Glad to see K2 finally getting some updates again. It's a good extension, but any integration with 3rd party social networks really needs pretty consistent updates. We'll have to check things out to make sure there's no issues, as always.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Yes we shouldn't have to modify their core files just to be able to use third party, and therefore far more page specific and targeted, meta-tag generation. They have also decoupled other services from the core so that third parties can continually enhance those services without requiring K2 to be rewritten.

So now I can disable those K2 meta-tag generation features which interfered with JFBConnect without having to hunt down the php file responsible and make a non override edit that would have to have been reapplied every time there was an update of K2. So yes this was really good news.
The topic has been locked.
Support Specialist
Definitely cool. Keep us posted if you run into any issues or have any general feedback on how we can improve integration with K2 :)

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
8 years 1 month ago - 8 years 1 month ago #57641 by webdevtim
I was made aware by Krikor at K2 that I can use K2 Extra fields to create a form for adding the following JFBConnet tags to an article so that each tag for each article is unique and optimized for the target Social Media venue. This would be much better than adding this to a content template and then modifying each tag by hand. Just requires a minor addition to the K2 Extra Fields php adding conditions for each of the JFBConnect fields I would add and then wrapping the value of the field with the JFBConnect tag representation like {SCFacebookLike …}. that would get inserted into the article and JFBConnect would then process it producing the meta tags and the Social Media API JavaScript, I think, depends on the order of the JavaScript. Does the HTML for article get created first and then JFBConnect reads it and adds the social Media icons?
{SCFacebookLike https://www.911truthoutreach.org/557-news-releases/368-behind-the-smoke-curtain.html show_faces=0 colorscheme=dark share=1 ref=Behind-The-Smoke-Curtain}
{SCTwitterShare href=http://911to.org/behind-smoke-curtain/ text=This paper presents compelling evidence for exposives inside the Pentagon on 9/11/2001 data_count=horizontal via=911TruthOut related=ae911truth,911Blogger,911truth_org,DC911truth,Davis911Truth,Anon911Truth,vernon911truth,911dokumentar,Seek911Truth,consensus911 hashtags=911truth size=small dnt=true}
{SCGooglePlusOne http://911to.org/behind-smoke-curtain/ annotation=bubble size=standard align=left recommendations=true}
{SCOpenGraph image=https://www.911truthoutreach.org/images/socialmedia/facebook/behind-the-smoke-curtain-banner.jpg}
{SCOpenGraph url=https://www.911truthoutreach.org/557-news-releases/368-behind-the-smoke-curtain.html}
{SCOpenGraph title=Behind The Smoke Curtain: what happened and what didn't happen at the Pentagon on 9/11/2001}
{SCOpenGraph description=This paper presents compelling evidence that the central fact of the Pentagon and the the World Trade Center attacks on September 11, 2001, all had inside-the-building explosives...}
{SCOpenGraph type=article}
Last edit: 8 years 1 month ago by webdevtim.
The topic has been locked.
Support Specialist
Sorry for the delayed response.

That's a great idea for the K2 extra fields :)

Does the HTML for article get created first and then JFBConnect reads it and adds the social Media icons?

Yes, the HTML for the page is fully generated by Joomla. Right before it's sent to the user, JFBConnect does a check of the output and does our tag replacements, so you should be able to do what you describe above without issue.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
8 years 3 weeks ago - 8 years 3 weeks ago #57729 by webdevtim
I will still have to do a template override to modify the K2 Extra Fields code so that the tags are wrapped with the JFBConnect curly brackets tag delimiters so the the form only requires entering the text and the URL for the image. Krikor just pointed me to the files that need to be modified and where in the files to add my modifications.

I imagine that this will only require adding a FOR loop with a bunch of IF statements to figure out which Extra Fields correspond to which JFBConnect tags.
Last edit: 8 years 3 weeks ago by webdevtim.
The topic has been locked.