Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Jacobsen 610 posts 2409 karma points
    Sep 10, 2018 @ 10:34
    Bo Jacobsen
    0

    How do we use the new social feature?

    Hi.

    I use the new 2.1.0 and are trying to use the new social features. But i can't figure out how.

    Normally i use this for seo

    Model.Content.GetPropertyValue<SEOChecker.MVC.MetaData>("seoChecker");
    

    When i just get the IProperty i get this. But i can't find any models for SEOCheckerSocial.

      {<SEOCheckerSocial>
          <socialImage />
          <ogTitle></ogTitle>
          <ogDescription></ogDescription>
          <twitterTitle></twitterTitle>
          <twitterDescription></twitterDescription>
        </SEOCheckerSocial>}
    
  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Sep 10, 2018 @ 10:40
    Richard Soeteman
    100

    Hi Bo,

    Best to use

    @{
        var meta = Model.Content.GetPropertyValue<SEOChecker.MVC.MetaData>("seoChecker");
    
    }
    @meta.AllTags
    

    Best,

    Richard

  • Bo Jacobsen 610 posts 2409 karma points
    Sep 10, 2018 @ 10:57
    Bo Jacobsen
    0

    Hi Richard.

    Thanks for answering.

    I am using it in a surfaceController, so this gives me null.

    Model.Content.GetPropertyValue<MetaData>("socials");
    

    Why i am using a surfaceController is because i need to get other opengraph properties like, og:url, og:type, og:locale, og:locale:alternate, og:{0}:publishedtime, og:{0}:modifiedtime.

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Sep 10, 2018 @ 11:07
    Richard Soeteman
    0

    Properties will still be on the meta object. Will add a property editor converter for socials in the next release..

    Best,

    Richard

  • Bo Jacobsen 610 posts 2409 karma points
    Sep 10, 2018 @ 11:49
    Bo Jacobsen
    0

    Okay i used SocialTags instead of AllTags.

    But only problem i got with that is

    1. og:type is always website. I also like to define article.
    2. twitter:title ,twitter:description, twitter:image is no longer used. They are replaced with og: https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started.html
    3. og:url is without domain. (only testet locale)

    But i'll keep it for now and change it when SeoChecker gets a new version :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies