Search Results for

    Show / Hide Table of Contents

    Class YammerUtility

    Holds yammer operation methods

    Inheritance
    System.Object
    YammerUtility
    Namespace: PnP.Framework.Utilities
    Assembly: PnP.Framework.dll
    Syntax
    public static class YammerUtility : object

    Methods

    CreateYammerDiscussionPartXml(String, Int32, Boolean, Boolean, Boolean)

    Constructs the webpart XML for yammer group needed to inject as Yammer web part to SharePoint page

    Declaration
    public static string CreateYammerDiscussionPartXml(string yammerNetworkName, int yammerGroupId, bool showHeader, bool showFooter, bool useSSO = true)
    Parameters
    System.String yammerNetworkName

    Yammer network name

    System.Int32 yammerGroupId

    Group ID

    System.Boolean showHeader

    Shows header based on value

    System.Boolean showFooter

    Shows footer based on value

    System.Boolean useSSO

    uses given Single Sign-on information to create webpart

    Returns
    System.String

    The constructed web part XML

    CreateYammerGroup(String, Boolean, String)

    Can be used to create Yammer group to the Yammer network

    Declaration
    public static YammerGroup CreateYammerGroup(string groupName, bool isPrivate, string accessToken)
    Parameters
    System.String groupName

    Creates yammer group with given name

    System.Boolean isPrivate

    Sets yammer groups as private if the value is true. Otherwise sets as public group

    System.String accessToken

    accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user

    Returns
    YammerGroup

    Returns YammerGroup created

    CreateYammerGroupDiscussionPartXml(String, Int32, Boolean, Boolean, Boolean)

    Constructs the webpart XML for yammer group needed to inject as Yammer web part to SharePoint page

    Declaration
    public static string CreateYammerGroupDiscussionPartXml(string yammerNetworkName, int yammerGroupId, bool showHeader, bool showFooter, bool useSSO = true)
    Parameters
    System.String yammerNetworkName

    Yammer network name

    System.Int32 yammerGroupId

    Group ID

    System.Boolean showHeader

    Shows header based on value

    System.Boolean showFooter

    Shows footer based on value

    System.Boolean useSSO

    uses given Single Sign-on information to create webpart

    Returns
    System.String

    The constructed web part XML

    CreateYammerOpenGraphDiscussionPartXml(String, String, Boolean, Boolean, String, String, Boolean, String)

    Constructs web part definition for Open Graph discussion web part definition

    Declaration
    public static string CreateYammerOpenGraphDiscussionPartXml(string yammerNetworkName, string url, bool showHeader, bool showFooter, string postTitle = "", string postImageUrl = "", bool useSso = true, string groupId = "")
    Parameters
    System.String yammerNetworkName

    Yammer network name

    System.String url

    Yammer URL

    System.Boolean showHeader

    Shows header based on value

    System.Boolean showFooter

    Shows footer based on value

    System.String postTitle

    creates webpart with given post title

    System.String postImageUrl

    creates webpart with given post title

    System.Boolean useSso

    uses given Single Sign-on information to create webpart

    System.String groupId

    yammer group id

    Returns
    System.String

    The constructed Open Graph Discussion Part XML

    GetYammerGroupById(Int32, String)

    Returns Yammer Group if group exists. If the group does not exist, returns null.

    Declaration
    public static YammerGroup GetYammerGroupById(int groupId, string accessToken)
    Parameters
    System.Int32 groupId

    Group Id to search for

    System.String accessToken

    accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user

    Returns
    YammerGroup

    Returns Yammer Group is group exists. If group does not exists, returns null.

    GetYammerGroupByName(String, String)

    Returns Yammer Group if group exists. If the group does not exist, returns null.

    Declaration
    public static YammerGroup GetYammerGroupByName(string groupName, string accessToken)
    Parameters
    System.String groupName

    Group name to search for

    System.String accessToken

    accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user

    Returns
    YammerGroup

    Returns Yammer Group is group exists. If group does not exists, returns null.

    GetYammerGroupDiscussionPart(String, Int32, Boolean, Boolean)

    Creates web part entity with the Yammer group structure on it

    Declaration
    public static WebPartEntity GetYammerGroupDiscussionPart(string yammerNetworkName, int yammerGroupId, bool showHeader, bool showFooter)
    Parameters
    System.String yammerNetworkName

    Yammer group network name

    System.Int32 yammerGroupId

    Yammer group id

    System.Boolean showHeader

    Shows header of webpart based on the value

    System.Boolean showFooter

    Shows footer of webpart based on value

    Returns
    WebPartEntity

    Returns created WebPartEntity

    GetYammerGroups(String)

    Returns Yammer groups based on the access token. All groups are returned for registered apps.

    Declaration
    public static List<YammerGroup> GetYammerGroups(string accessToken)
    Parameters
    System.String accessToken

    accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user

    Returns
    List<YammerGroup>

    All groups in the network

    GetYammerOpenGraphDiscussionPart(String, String, Boolean, Boolean, String, String, String)

    Creates web part entity with the Yammer OpenGraph structure on it for specific URL

    Declaration
    public static WebPartEntity GetYammerOpenGraphDiscussionPart(string yammerNetworkName, string url, bool showHeader, bool showFooter, string postTitle = "", string postImageUrl = "", string defaultGroupId = "")
    Parameters
    System.String yammerNetworkName

    Yammer network name

    System.String url

    yammer URL

    System.Boolean showHeader

    Shows header based on value

    System.Boolean showFooter

    Shows footer based on value

    System.String postTitle

    creates webpart with given post title

    System.String postImageUrl

    creates webpart with given post title

    System.String defaultGroupId

    creates webpart with givne group id

    Returns
    WebPartEntity

    Returns created WebPartEntity

    GetYammerUser(String)

    Returns yammer user if user exists. If the user doesn't exist, returns null

    Declaration
    public static YammerUser GetYammerUser(string accessToken)
    Parameters
    System.String accessToken

    accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user

    Returns
    YammerUser

    Back to top PnP Framework
    Generated by DocFX with Material UI
    spacer