Closed Hermitude closed 4 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
<script src="https://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script type="text/javascript">
var item = {
"actor":{
"__metadata":{"type":"SP.Social.SocialActorInfo"},
"ActorType":2,
"ContentUri": "https://zheguo.sharepoint.com/"
}
};
$( document ).ready(function() {
$.ajax({
url: _spPageContextInfo.siteAbsoluteUrl + "/_api/social.following/isfollowed",
type: "POST",
contentType: "application/json;odata=verbose",
data: JSON.stringify(item),
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function (data) {
console.log(data);
},
error: function (data) {
alert("Error");
}
});
});
</script>
The data returned:
SP.Social.SocialActorInfo.actorType property
This should be a typo in the document, please see the sample request body:
For document (ActorType:1)
For Site (ActorType:2)
For Tag (ActorType:3)
Hi, Thanks for your thorough response.
Endpoint URI structure GET http://
/ /_api/social.following/my/followed(types=15) Request parameter types
Type: Int32
The actor types to include. Users = 1, Documents = 2, Sites = 4, Tags = 8. Bitwise combinations are allowed.
I am also getting the same issue.
I have been using SharePoint online rest endpoint to get users to follow documents. The endpoint is {sitepath}/_api/social.following/my/followed(types=2) In the Same, I follow the Document using REST API Post method {sitepath}/_api/social.following/follow I was able to get follow docs in the response but from the last couple of DAYS, These endpoint has stopped working and not receiving the docs in response. Is there one else facing a similar issue or know about any outage on Microsoft side? Because the Same issue happened in all our client Tenants. FYI: This Query used in the APP Web. (SharePoint Hosted)
The Same issue happened across all my tenants. I have been checked more than 5 Tenants the same issue.
Please help to me Resolve this @andrewconnell @Hermitude @Jerry0527
Hello, we are currently experiencing the same issues in at least 2 tenants.
I also had code working for months that can no longer use the isfollowed endpoint.
Code for reference:
var data = JSON.stringify({
"actor":{
"__metadata":{
"type":"SP.Social.SocialActorInfo"
},
"ActorType":1,
"ContentUri": docUrl,
"Id":null
}
});
var headers = {
"accept": "application/json;odata=verbose",
'content-type': 'application/json;odata=verbose',
'X-RequestDigest': document.getElementById('__REQUESTDIGEST').value,
credentials: 'same-origin'
}
fetch( followingManagerEndpoint + '/isfollowed', {
method: 'POST',
headers: headers,
body: data
})
I am also encountering this issue. The request to retrieve followed content does not return the correct data and following would result in a 404 error.
This has broken solutions in a few areas for my client.
Is there an estimated timeline for this to be resolves? Thanks all!
@JeremyKelley ... possible change in REST API behavior?
Hi I had find one workaround to get My followed documents using below URL
return $.ajax({
url: webUrl + "/_api/social.following/my/followed(types=6)",
type: "Get",
processData: false,
contentType: "application/json;odata=verbose",
headers: { "Accept": "application/json; odata=verbose" },
});
Once you received the response filter as shown below to get followed documents.
IsFollowed = true
CanFollow = false
Thanks @akashpanjwani . Have you found any workarounds for /isfollowed?
Hi @andrewconnell
Do we have a progress update into the investigation of this issue? If so is there a rough timeline for a resolution?
Thanks Andrew!
@WaltBC nothing shared = nothing to share. If I learn something, I'll share :)
Thanks @akashpanjwani . Have you found any workarounds for /isfollowed?
Yes we need to check from current user followed document whether exist or not.
I've asked the team that owns this API if they have any ideas what might be going on here either they or I will come back with an update based on what they find.
Separately you can use the newly updated to 1.0 Microsoft Graph API for following / unfollowing sites. Follow Unfollow List followed sites
As best we can tell the result from the Microsoft Graph API is up to date as you follow and stop following sites.
Thanks @JeremyKelley , note that the endpoint _/api/social.following/my/followed works for followed sites, but it has stopped working for followed documents
I have found great success transitioning from the isFollowed and /my/followed endpoints to Graph as @JeremyKelley stated.
For docs, how about https://graph.microsoft.com/v1.0/me/drive/following? I have found this to work well and it includes followed docs in SharePoint sites.
https://docs.microsoft.com/en-us/graph/api/drive-list-following?view=graph-rest-1.0&tabs=http
Thanks, @eoverfield, note that this same suggestion was already mentioned by @siljemda in the duplicated issue #5669, 16 days ago. In my experience, /me/drive/following does NOT return the same documents than _/api/social.following/my/followed(types=2). The followed documents we need are the same that appear under "Docs I'm following" in https://[YOUR TENANT]-my.sharepoint.com/personal/[USER_LOGON]/Social/FollowedContent.aspx
Sorry to bother you @JeremyKelley ... it has been 15 days since your team started to investigate (more than 1 month since this bug was opened). Nothing yet to share?
I'm not sure if this has been officially fixed or not, but my API calls started working correctly again.
True. Both isfollowed and followed(types=2) are working for me as well. Thanks @sethstevenson.
@Hermitude can you confirm its working for you as you were the OP?
It's working for me too. Any idea what happened?
¯_(ツ)_/¯ looks like someone rolled a fix out :)
I think this issue should not be closed because Jeremy said that he or his team will come back with an update based on what they find. They should have the opportunity to explain.
@Rafaelki They can, there's nothing blocking them from commenting on the closed issue... technically the issue is fixed though, so it makes sense to close it as it's no longer reproducible... that's why I asked the OP @Hermitude to confirm since he/she owns the issue.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues
(First time user of GitHub, please forgive any errors)
Category
Describe the bugs
I've been using the example code for following/unfollowing documents from SocialRestFollowingManager resource (/_api/social.following) successfully for several months in the Sharepoint Online environment. I'm applying this in a classic site content editor webpart as well as on a modern page using spfx field customizer extension.
Over the last week I have experienced the following issues:
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.