function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
IndrasenIndrasen 

Regarding Chatter Poll

Hello,

         I want to create a apex class and visualforce page which include all the functionallity of chatter like Post, Link, File and Poll.

 

Now i created all the features except poll functionallity. Can Anybody help me on how to create Chatter Poll by using our own visualforce page and controller?

 

thank in advance!!!

ChrisOctagonChrisOctagon

Hi,

 

You can create Chatter Polls using the Chatter REST API or Connect in Apex (which is dev-org only in the Spring 13 release). The documentation for the Spring release (which is rolling out this weekend and the next couple weekends) of both is found here: http://www.salesforce.com/us/developer/docs/chatterapipre/index.htm

 

In the Chatter REST API you can:

- post a new poll feed item to a feed using a POST to /chatter/feeds/<feed type>/<subject id>/feed-items

- retrieve info about a poll and vote on it using /chatter/feed-items/feedItemId/poll

 

In Connect in Apex you can:

- post a new poll feed item to a feed using ChatterFeeds.postFeedItem(String communityIdFeedType enum feedTypeString subjectIdFeedItemInput feedItemBinaryInput feedItemFileUpload) where your FeedItemInput holds a poll attachment

- vote on a poll using ChatterFeeds.voteOnFeedPoll(communityId, feedItemId, myChoiceId)

 

Hope this helps,

- Chris

SFDC Admin & AnalystSFDC Admin & Analyst
Hi Indrasen,

Were you able to achieve this functionlity? I need to Implement this functionality now. Can you please help me with this?

Thanks,