AEM Communities blog-how to list followers details

Avatar

Avatar
Springboard
Level 3
Sh1ju
Level 3

Likes

13 likes

Total Posts

56 posts

Correct reply

4 solutions
Top badges earned
Springboard
Validate 1
Establish
Ignite 1
Give Back 5
View profile

Avatar
Springboard
Level 3
Sh1ju
Level 3

Likes

13 likes

Total Posts

56 posts

Correct reply

4 solutions
Top badges earned
Springboard
Validate 1
Establish
Ignite 1
Give Back 5
View profile
Sh1ju
Level 3

17-04-2018

We can list items(Blogs,Authors,Tags and Archives) under a particular blog category with the help of DefaultSocialGetServlet(using selector social).Please tell me how to list the details of persons following a blog.

blog.png

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Employee
Rahul_Bhardwaj
Employee

Likes

17 likes

Total Posts

60 posts

Correct reply

23 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Employee
Rahul_Bhardwaj
Employee

Likes

17 likes

Total Posts

60 posts

Correct reply

23 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
Rahul_Bhardwaj
Employee

22-04-2018

AFAIK, there is no direct API but you can access social:rootCommentSystem property of the blog id using your logged in user.
e.g for blog id '/content/usergenerated/asi/jcr/content/we-retail/us/en/community/blog/jcr:content/content/ primary/blog/layer-it-on'

social:rootCommentSystem is

/content/we-retail/us/en/community/blog/jcr:content/content/primary/blog

The blog site url will be this path till jcr:content and add .html to render it. i.e. /content/we-retail/us/en/community/blog.html will render the blog site for you.

Alternatively, you can also access top level resource of a blog id by commentObj.getTopLevelResource() , which will essentially give you same as social:rootCommentSystem and than you can proceed as above.

The blog site URL path is also present in basePageURL. This property will be available to you while rendering blog id and you can see this in the entry_topic.hbs. If you have to use it while rendering the blog id only, this will be your best bet. Overlay hbs file and use basePageUrl, wherever you want to use,

I want to add that if you have to use this, overlay or extend(preferrably) blog instead of doing in OOTB components.

Answers (4)

Answers (4)

Avatar

Avatar
Springboard
Level 3
Sh1ju
Level 3

Likes

13 likes

Total Posts

56 posts

Correct reply

4 solutions
Top badges earned
Springboard
Validate 1
Establish
Ignite 1
Give Back 5
View profile

Avatar
Springboard
Level 3
Sh1ju
Level 3

Likes

13 likes

Total Posts

56 posts

Correct reply

4 solutions
Top badges earned
Springboard
Validate 1
Establish
Ignite 1
Give Back 5
View profile
Sh1ju
Level 3

22-04-2018

Thanks for sharing valuable information.

How can we get blog site url from a blog id ?For example ,one of we-retail  bog id is '/content/usergenerated/asi/jcr/content/we-retail/us/en/community/blog/jcr:content/content/primary/blog/layer-it-on' .Is there any API to get blog url from this blog id ?

Avatar

Avatar
Boost 5
Employee
Rahul_Bhardwaj
Employee

Likes

17 likes

Total Posts

60 posts

Correct reply

23 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Employee
Rahul_Bhardwaj
Employee

Likes

17 likes

Total Posts

60 posts

Correct reply

23 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
Rahul_Bhardwaj
Employee

18-04-2018

@Sh1ju - No, that's not possible and there is no such api as well.
You can use [0], to get all subscriptions of a user but can't get all followers to a particular component. You can try modifying code snippet [1] as follows -

List<String> list = new ArrayList<String>();

String type = map.get(TYPE).toString();

//Add to result if the

if(type.equals(substype)) {

if(map.get(EDGE_END).equals({path of your blog}) {

     list.add(map.get(EDGE_START).toString());

}

and see if that works

[0] - aem-communities-extensions/aem-communities-subscription-management at master · Adobe-Marketing-Cloud...

[1] - https://github.com/Adobe-Marketing-Cloud/aem-communities-extensions/blob/master/aem-communities-subs...

Avatar

Avatar
Springboard
Level 3
Sh1ju
Level 3

Likes

13 likes

Total Posts

56 posts

Correct reply

4 solutions
Top badges earned
Springboard
Validate 1
Establish
Ignite 1
Give Back 5
View profile

Avatar
Springboard
Level 3
Sh1ju
Level 3

Likes

13 likes

Total Posts

56 posts

Correct reply

4 solutions
Top badges earned
Springboard
Validate 1
Establish
Ignite 1
Give Back 5
View profile
Sh1ju
Level 3

17-04-2018

Do we have any out of the box reporting feature to list down subscribers/followers to a blog ? We are using ASRP for storage.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

17-04-2018

Checking with the product team.