A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [connect-api]

ConnectApi is the Apex namespace that includes Chatter in Apex functionality.

Filter by
Sorted by
Tagged with
3
votes
1answer
915 views

How to use ConnectApi.ChatterFeeds class if Chatter is disabled

I have the following problem: my code uses ConnectApi.ChatterFeeds.postFeedElement and ConnectApi.ChatterFeeds.postFeedElementBatch methods to operate feed items. That works properly is Chatter is ...
0
votes
2answers
120 views

how to like chatter comments

How can I use the ConnectAPI to like a chatter comment? I'm looking at the likeFeedItem method in the ChatterFeeds class. How do I get the FeedItemId? I'm not seeing a method to get the FeedItemId? ...
2
votes
1answer
285 views

Error when adding user to Chatter group with ConnectApi: Unknown user (System Code)

I have a trigger (onAfter insert User) that adds a newly created User (with Community profile assigned) to a public Chatter Group. For this I have used ConnectApi. The code is the following: public ...
0
votes
0answers
924 views

Sending Chatter Private Message using Apex Trigger/Class

Need to send a Chatter Private Message to the current user whenever they post something inappropriate on the chatterfeed. I've already got the code to send the message through Apex, but it is ...
0
votes
1answer
191 views

How to post to Chatter Answers Community using code

I'm building a custom look/feel for Chatter Answers Community by pulling questions and replies and I'm now at a point where I have to implement users posting replies on this custom front-end I've ...
0
votes
1answer
384 views

Can Chatter ConnectAPI be used to search chatter post feed only

Currently i am trying get chatter feed in visualforce page. I only want the feed which has a query string. But i want all the recent comments for the post. I couldn't find a visualforce tag to get the ...
0
votes
0answers
116 views

Getting collection of chatter answers and their replies - getting null question objects

I'm trying to get a collection of chatter questions and their related replies, but for some reason, I'm getting the correct replies, but null values for the question object. Here's my code: public ...
0
votes
1answer
127 views

How to programmatically surface chatter answers and replies

I'm trying to use apex/visualforce to surface all the questions and replies to these questions. I'm having a hard time wrapping my head around how to go about doing this. I'm able to display one ...
10
votes
1answer
780 views

Is There a Way to Get Chatter Notifications?

If you @mention or send a message to a Chatter user, you get a notification in Salesforce1. This appears immediately so it's a safe bet that push notifications are being used to dispatch them. However ...
2
votes
2answers
116 views

New ConnectAPI.PollCapabilityInput() Compile Fail

​ConnectApi.PollCapabilityInput pollInput = new ConnectApi.​PollCapabilityInput(); The above code does not compile. The error says: Error: Compile Error: Invalid type: ConnectApi.​...
3
votes
1answer
457 views

Feed Items and Badges

I'm trying to write a trigger that awards badges to people and then posts them in a chatter post. I've found this: https://help.salesforce.com/HTViewSolution?id=000199013&language=en_US Which is ...
2
votes
2answers
455 views

Error message: Only user and group IDs may be used in inline mentions

I've written a program where I used the ConnectApi class and especially the postFeedElement function. First I've implemented all in a Dev. Org (Spring '15) where I tested it, the tests ran all well. ...
1
vote
2answers
270 views

Querying all the files from a list of groups for a particualr user

I'm trying to display all the files of all the Groups to which a user belongs to. i.e, if the user is a member of GroupA and GroupB, then I have to display all the files which belong to GroupA and ...
1
vote
1answer
166 views

Can successfully send GET request to Chatter API but not POST, receiving INVALID_SESSION_ID

I never had this issue using the REST data API - I'm using the Chatter API and trying to post to a group. I am setting the correct instance url in the request, and passing the returned access token as ...
1
vote
1answer
104 views

connectapi follow a post on chatter

How can I create a link on a visualforce page that when I click it, it will follow that that post using the connectapi Also how can I display the posts that I follow using the connectapi
1
vote
1answer
338 views

Getting all chatter groups into a page

How can I leverage standard chatter page functionality to show all chatter groups in my org? If you click on chatter, then groups, you see a list of all available groups... as shown below
1
vote
1answer
595 views

How can I change the current user(in apex) or give “Connection User” access to the Connect API?

I am trying to write code that will post to an objects chatter feed and mention a list of users so they will get a push notification on salesforce1. This code will be a batch which is run from a ...
0
votes
2answers
676 views

How to get the Photo using connect api

Can anyone tell me how to get the chatter profile pic using connect api in visualforce page? I need a sample code for this...Because I am new to connect api. Thanks in advance Karthick
2
votes
4answers
966 views

creating Chatter FeedItem with sites user

is it possible to create a chatter FeedItem with a sites user with public access, is there any workaround to get this done? I tried to insert it with "insert" and also with the ConnectApi but I got ...
2
votes
1answer
323 views

Assigning a Topic when using postFeedElementBatch

I'm using the sample code from this part of the Developer's Guide to create Chatter Posts when certain conditions are met on a Case record. It all works well, but I'm not seeing any way that I can ...
1
vote
0answers
161 views

seeAllData = false vs. ConnectApi

I have a trigger on FeedItem that auto-tags a topic. It does so by creating a TopicAssignment record and inserting it via DML. The problem is that I am getting a gack if I attempt to auto-assign a ...
2
votes
2answers
906 views

How to get Chatter photo fileId?

I'm trying to use ConnectApi.ChatterUsers.getUserBatch() to migrate users' photos. However, the ConnectApi.User object that I get only seems to have access, through its photo property, to the ...
3
votes
1answer
809 views

Post to a Chatter feed as a different user than the logged un user from a Trigger

I have a trigger that posts to a Project Object's feed and @mentions someone. The only problem is that I need to be able to post the message as another user, not the user who is logged in. How can I ...
3
votes
0answers
358 views

References to URLs returned by Apex ConnectApi in Salesforce1 mobile

I have a VF page that I am using as an inline page on the Opportunity detail page layout. It retrieves and displays files (FeedItems with ConnectApi.ContentCapability) from Chatter feeds on records ...
2
votes
1answer
2k views

Unable to create ConnectApi test data

I'm stuck trying to write a test method for the ConnectApi. Specifically, I have a remote action that uses the ConnectApi.QuestionAndAnswers.getSuggestions() method, which returns related (Chatter) ...
1
vote
0answers
230 views

Upload New Version file to chatter feed through Connect API

I am trying to use "upload a new version" functionality for files in chatter through Connect API in my VF page.I am not getting any proper solution to implement it. Please suggest how I can do it ...
4
votes
1answer
90 views

Find the source device of a FeedItem / FeedComment

When looking at the Chatter Feed some posts or comments have the addition by what mobile device this post/comment was issued from. I would like to query that device information via apex, but can't ...
1
vote
2answers
364 views

Can “Customer Community Login” make use of ConnectAPI.ChatterFeeds.* classes and methods?

Can "Customer Community Login" license make use of ConnectAPI.ChatterFeeds.* classes and methods? If so, is there a profile tweak that needs to be done? Initial attempts to execute the following ... ...
1
vote
2answers
536 views

Invalid type: ConnectApi.User​​GroupPage

I'm working on a Visualforce page where I want to grab a user's groups and paginate over the list. Getting the groups is pretty straightforward using the ConnectApi's ChatterUsers.getGroups method (...
3
votes
1answer
429 views

Can Chatter Connect API set createdByUser to other than logged in user?

I know this question has been asked earlier but I could not find the answer. I am trying to create chatter Feed using Chatter connect API and my need is "Createdby user should be different than ...
11
votes
2answers
13k views

How can I create a Chatter File via Apex?

From the Chatter tab I can go to 'Files' and then upload a file without attaching it to anything. I am wanting to know if there is a way to achieve the exact same thing via Apex?
2
votes
1answer
1k views

Unable to send myself a test Chatter Message

I am trying to send myself a test Chatter message as the first step towards a proof of concept. The desired outcome is that I will get a private chat message pop up in the bottom right-hand corner of ...
1
vote
1answer
162 views

Can I get a call back to my VF page when I call ConnectApi.ChatterFeeds.postFeedItem in my Apex class

I am trying to post to a chatter feed from my Visual Force page. I am using a custom implementation of the chatter feed so I am using an input box and a Command link to try to post to the chatter feed....
1
vote
1answer
2k views

How can I send a Record ID to my APEX class from my VF page as soon as it loads?

I am trying to create a custom chatter feed in my Visual Force page. I am using the Apex repeat tag to try to create a list of posts from the chatter feed. I have this working perfectly for a feed ...
3
votes
2answers
2k views

Record chatter post with link

Using ConnectApi Reference: http://www.salesforce.com/us/developer/docs/apexcode/Content/connectAPI_outputs.htm#capi_entityLinkSeg_output I want to create from apex code a chatter post on a record, ...
1
vote
1answer
1k views

Can't get Mule Studio Salesforce connector to connect, verified SF login and Security Token

I created a new demo project, from their canned demos, which only has 3 components. I filled in my force.com developer login. But any time I touch the SF icon in the diagram, or try to change any ...
2
votes
2answers
1k views

How can i get Thumbnail Image depending on files of chatter?

First of all i have a question how will i pull my files that i find in chatter Tab for community user through Chatter Connect In APEX or REST API? And Also I need to display Icon based on image .Lets ...
8
votes
2answers
1k views

How to add permission to Salesforce Chatter Collaboration Group sObject?

I have communities enabled in my org and i have a class which will auto add the new registered member to a chatter group. CollaborationGroupMember cand = new CollaborationGroupMember(...
1
vote
1answer
341 views

How to display all chatter posts having @ mention to logged in user

I have a requirement where the logged in user should be able to view all chatter posts which are having an @ mention to him. I need the exact chatter post to be shown as the user want to comment on ...
3
votes
2answers
104 views

How to Show only the posts and comments from people I follow?

I want to replicate people filter logic in apex which shows only the posts and comments from people I follow. Is there any connectApi Namespaces availabe for this? Please suggest. Thanks.
4
votes
1answer
337 views

Chatter in Apex: is it DML?

So there's times you can't DML (getters, constructors, components without allow DML, etc). Can we use chatter in apex, or is that also considered inserting records?
1
vote
1answer
237 views

How to get Chatter Recommended Users Via Connect Api in apex

I am trying to get the Chatter recommended Users in apex either via ConnectApi or any other means but not via rest Api. I am unable to find any connect Api call that returns me the list of recommended ...
5
votes
2answers
3k views

How do I make a Visualforce PDF respect new line characters?

I have a Visualforce page where I need to show the chatter posts in a PDF. The chatter post is generated by apex code and contains new line characters. I am querying the posts and displaying them ...
2
votes
0answers
342 views

Only user and group IDs may be used in inline mentions

I'm creating Chatter feed items using connect API apex. I want a simple message that contains a link to the user and a related object, e.g. opportunity. I'm getting this message when running the code ...
2
votes
2answers
5k views

How to dynamically creating chatter groups in Apex?

It looks like ConnectApi.ChatterGroup is abstract. Is there really no way to create Chatter groups via connect in Apex? Is the solution to call the chatter REST API from APEX? UPDATED based on ...
2
votes
0answers
2k views

Chatter in APEX (Connect API) with VF: Best practices to avoid limits

I am currently working on using "Chatter in APEX" aka ConnectApi to display feeds from custom object records in a Visualforce page. I am using one VF page with links that re-render the same page but ...
4
votes
2answers
2k views

How do I write tests for custom classes that primarily use ConnectApi?

I have implemented a VF page that displays a Chatter Group feed using the example classes provided in the Salesforce Cookbook. I have implemented all of these classes (with some tweaks and added ...
3
votes
1answer
3k views

Error: The Connect API is not enabled for this user type

I am working on creating a Force.com site and I have a VF page which displays fields from a custom object record and also displays its Chatter feed. I achieved displaying the Chatter feed using the ...
9
votes
2answers
606 views

Does 'Chatter in Apex' aka Chatter Connect API support Bulkified insert operations?

I want to add Chatter feeds from Trigger and obviously I am going to implement this as Bulkified. I have data in the following format. Public Class ChatterFeedInfo { public Id usermentionId {get;...
5
votes
1answer
2k views

Retrieve UserId of @mention user from chatter post in Apex

Is there a way to retrieve the user id of @mention user from chatter post in Apex? We can write a before insert trigger on feeditem, but when we display the body (which has @mention user) it simply ...