You need to sign in to do that
Don't have an account?
ConnectApi and Managed Package
Hey,
I've created an app that allows users to post messages to each others Chatter feeds.
This app uses "Chatter in Apex" (the ConnectApi), specifically
ConnectApi.FeedItemInput feedItem = ChatterMessenger.convertToFeedItemInput(messageContent);
ConnectApi.ChatterFeeds.postFeedItem(null, ConnectApi.FeedType.UserProfile, userDetails[0].Id, feedItem, null);
The app is deployed as a managed package, however when I try to install the package on an organisation that has chatter disabled, the installation fails even though the Chatter dependency box is unticked.
I know one of the solutions is to remove all references to Chatter and to use reflection as discussed here but I was hoping to avoid this approach. Since "Chatter in Apex" is relatively new, I thought there might be a newer/better solution to handling the case where Chatter is not enabled by an organisation.
As of 29.0, packages that include Chatter in Apex code can't install unless Chatter is enabled. I've passed along your feature request, though, so that's something :-).