本文介绍了CSOM中的SiteLogoUrl在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了 SPWeb.SiteLogoUrl 和在CSOM和REST中需要此属性.但是我没找到.如何使用CSOM或REST获得SiteLogoUrl?

I found SPWeb.SiteLogoUrl and expected this property in CSOM and REST. But I didn't find it. How can I get a SiteLogoUrl using CSOM or REST?

SP.js

Microsoft.SharePoint.Client.dll

推荐答案

它已移至SharePoint通过appredirect.aspx重定向时创建的POST请求.因此,获取网站徽标网址"的唯一方法是处理适当的POST请求.

It was moved to the POST request that SharePoint creates while redirecting via appredirect.aspx. So, the only one way to get Site Logo Url is to handle appredirect POST request.

要启动重定向,您应该使用以下代码段:

To initiate redirect you should use this code snippet:

Response.Redirect(TokenHelper.GetAppContextTokenRequestUrl(sharePointHostUrl, Server.UrlEncode(targetUrl)));

ContextToken,SiteLogo,Url,标题等可以在POST FormData中找到.

ContextToken, SiteLogo, Url, Title and so on can be found in the POST FormData.

这篇关于CSOM中的SiteLogoUrl在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 12:41