• jody_bly
  • NEWBIE
  • 195 Points
  • Member since 2012
  • Principal Technical Writer
  • Salesforce.com

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 75
    Replies

I am using forcetk.mobilesdk.js to develop a chatter app.

 

Tried to get group using following method:

$j('#link_fetch_sfdc_group').click(function() {
logToConsole("link_fetch_sfdc_group clicked");
forcetkClient.query("select Name, Type, OwnerId from Group", onSuccessSfdcGroup, onErrorSfdc);
});

 

I can't the group created by me. I got 37 groups returned, but none of them are my groups. And all of them have empty "Name" attribute. What have I done wrong? How can I retrieve groups I belong to?

 

thanks!

I am working on building application on SFDC which will have http callouts to external REST API. 

 

https://help.salesforce.com/apex/HTViewHelpDoc?id=integrate_api_rate_limiting.htm&language=en According to this link, 

 

"Any action that sends a call to the API counts toward usage limits, except the following:

Outbound messages

Apex callouts"

 

My question is, do external HTTP callouts count towards this API limit? If not, is there a limit on number of external HTTP API calls I can make?

 

Apologies if this has been answered before. 

 

Thanks,

Swaroop

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.

Hello Everyone,

 

Does anybody know how to get list of user's bookmarks via apex? can't find any appropriate object in scheme...

 

Thank you!

Hi

 

I've just been watching the Summer 13 webinar, and was interested in the new Publisher Action functionality.  Now according to the release notes:

 

Global create actions let users create object records, but there’s no automatic relationship between the record that’s created and any other record. You can add global actions to page layouts for the home page, the Chatter tab, and object detail pages.

 

And it also says:

 

The page layout editor has a new Actions category in the palette and a new Chatter Feed section on the layout. You can use
the page layout editor to customize the actions in the publisher for each object type and page layout. You can drag actions
from the palette to the Chatter Feed section of the page layout and order them as you wish.

 

I want to add a Create Account action on the home page layout, but can't figure out where the page layout for the home page is.  It sounds from the release notes that there is a way to do this.  Any thoughts out there?

 

Thx,

Hamayoun

I follow certain records with sensative material in them. Some of my Followers may not have access to their types of records. I may Follow some of those records, and therefore have Chatter posts from that record show up on my personal Feed. Would one of my Followers then be able to see that post if they were to come to my Profile - or would that post not be visible to them because it originated in a record which they did not have access to ?
Hello friends,

i'm trying to upload a single file to chatter in a sandbox and I get the following error:
__MISSING LABEL__ PropertyFile - val CollabGroupDuplicateNameException_desc not found in section Exception

does anyone knows what I have to enable/disable to make the upload work again?
We have a Customer Community based on the Napili template. We need to reset values on a field in Topic records which Salesforce support says must be done using the Chatter API.  I tried to do this using cURL and username-password OAuth authentication, but to connect to a Community requires using the  OAuth Web server or user-agent workflows.  These appear to require creating an application to manage the process of user authentication and handling of the token to use for my update requests.  Does anyone have experience with this or know where I can find better detail than the Salesforce documentation on how to accomplish this?
I want to get friend's feeds to show them into friend profile. I was using this api to get but it did not work. I replaced userId = friend's id. Looks like I don't have a permission to access friend's feeds. Does anyone know how to get ?
/connect/communities/communityId/chatter/feeds/news/userId/feed-elements

http://www.salesforce.com/us/developer/docs/chatterapi/Content/connect_resource_feeds_news.htm#cc_news_feed_elements
Hello - I'm using the Chatter API for iOS and Android. I was wondering if anyone has any code samples of using the PATCH method for updating profile parameters - where the values are in the json/xml?  I can't seem to find any samples. 

 
I am trying to replace a chatter feed I use in a VF page, in the past I used 
 
return ConnectApi.ChatterFeeds.getFeedItemsFromFeed(communityId, ConnectApi.FeedType.Record, groupId).items

But that has gone away in api 31 (it also just broke on its own somehow) and I want to use the most up-to-date way of getting the data. I am getting  the error   Line: 6, Column: 90 unexpected token: ','  when I try and run this in execute anonymous,
 
private static List<Community> customCommunity = [Select NetworkId, Name From Community where name = 'Sales Community'];
    private static String communityId = customCommunity[0].NetworkId;
    private static List<CollaborationGroup> CollaborationGroup = [SELECT Id FROM CollaborationGroup where name = 'Agency Forum'];
  	private static String groupId = CollaborationGroup[0].Id;

	public static ConnectApi.FeedElementPage ConnectApi.getFeedElementsFromFeed( communityId , ConnectApi.FeedType.Record , groupId);

I can find no real world examples of how to do this
Hi,
I'am trying to implement push notifications for a hybrid app.I have followed the steps from mobile sdk development guide.
1.Configuring push services from the device technology provider (Apple for iOS, Google for Android)
2.Configuring your Salesforce connected app definition to enable push notifications
3.Implementing Apex triggers
OR
Calling the push notification resource of the Chatter REST API

In this step as am not going for the apex triggers ,i need the push notification resource of the Chatter REST API.I want to know how to use this  push notification resource.
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 through Connect API or APEX Rest call

Thanks
Arabinda
I'm having trouble with the tests for deployment of chatter messaging (private messages) in the visualforce community that I'm building. The tests all work in sandbox no problem but when I try and deploy to production I get the following incredibly vague error with no line numbers or anything:

Validation Errors While Saving Record(s)
Stack Trace: null

Below is a completely cut down version of a method that causes the issue. The user creation code is used elsewhere in other tests and doesn't cause difficulties and as far as I can tell all chatter permissions are enabled on the profile (it is a custom user profile which many of our employees use). I have also tried sending the message as myself instead of creating a user for that and encounter the same issue.

@isTest(SeeAllData=true)
static void testConversationCreation() {
		
    	Profile	profile = [Select Id FROM Profile WHERE Name = 'General Users'];
    			
	User sender = new User(Alias = 'unittest', Email='test@unittesting.com', 
            EmailEncodingKey='UTF-8', LanguageLocaleKey='en_US',
            LocaleSidKey='en_US', ProfileId = profile.Id,
            Title = 'Tester', FirstName = 'Test', LastName = 'Sender',
            TimeZoneSidKey='America/Los_Angeles', UserName='test@unittestingsender.com');
        insert sender;    
        
        User recipient = new User(Alias = 'unittest', Email='test@unittesting.com', 
            EmailEncodingKey='UTF-8', LanguageLocaleKey='en_US',
            LocaleSidKey='en_US', ProfileId = profile.Id,
            Title = 'Tester', FirstName = 'Test', LastName = 'Recipient',
            TimeZoneSidKey='America/Los_Angeles', UserName='test@unittestingrecipient.com');
        insert recipient;
        
        System.runAs(sender) {
        	ConnectApi.ChatterMessage message = ConnectApi.ChatterMessages.sendMessage('test', recipient.Id);
        	
        	System.assertNotEquals(null, message);
        }
}


I am looking for a solution to send a personal message to one specific user.

Now i use in a trigger
<cut some lines here>
ConnectApi.FeedItem feedItemRep = ConnectApi.ChatterFeeds.postFeedItem(Null, ConnectApi.FeedType.UserProfile, UserId, BinSegment);

and the message is forwarded to the user as indicated in UserId.

BUT

If an user starts following another user, he/she gets all messages from the other.

How can i force the message to be send to that one user only !

I logged into chatter app using my credential. When I tried to open another user's feeds using following REST API

 

/services/data/v28.0/chatter/feeds/news/005i0000001lc4X/feed-items

 

where  005i0000001lc4X is that user's Id, I got error message saying:

 

HTTP/1.1 403 Forbidden Date: Wed, 20 Nov 2013 07:31:38 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked
[ { "message" : "You do not have permission to execute that operation.", "errorCode" : "INSUFFICIENT_ACCESS" } ]

 

Any idea why? Because I am following this user, I should be able to view his news feeds, right?

 

Thanks in advance!

 

 

 

 

Hi. I'm using the chatter connect to create a chatter post.

Ref: Connect

 

All works fine but i want to specify the user that creates the chatter post.

In the previous version of my code, i don't use the connect and i have the following instruction:

 testpost.CreatedById=user.id; 

 

Do you know how i can do this in the connect api chatter?

My class:

Global class HappyBirthdayRandomPilot implements Schedulable{
//FOR TEST METHOD
   public static String CRON_EXP = '0 0 0 3 9 ? 2022';
   
  Global void execute(SchedulableContext sc) 
    {

            
           // SEARCH BY STATIC RESOURCE NAME
           List<StaticResource> Pictures=[Select Name, ContentType, Body From StaticResource where Name like 'PicturehappyBirthday%'];
           // IS THE USER BIRTHDAY?              
           List<user> lstu=[SELECT id,name,date_of_birth__c FROM user WHERE  CALENDAR_MONTH(date_of_birth__c)=:date.today().month() AND  DAY_IN_MONTH(date_of_birth__c)=:date.today().day()];
           CollaborationGroup group=[Select id,name from CollaborationGroup where Name like 'name%' limit 1];
                     
           //String communityId = null;
             
             
              for(User u:lstu)
              {
                //GENERATE A RANDOM NUMBER [0-5] TO SELECT THE PICTURE
                   Integer choice=math.mod(Integer.valueof(Math.random()*100),6);
                   Blob Decodedbody=Pictures[choice].body;

                // CREATE A FEED_ITEM_TEXT 
                    ConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput();
                    messageInput.messageSegments = new List<ConnectApi.MessageSegmentInput>();
                    ConnectApi.TextSegmentInput textSegment = new ConnectApi.TextSegmentInput();
                    textSegment.text = 'Happy birthday to ';
                    messageInput.messageSegments.add(textSegment);
                    ConnectApi.MentionSegmentInput mentionSegment = new ConnectApi.MentionSegmentInput();
                    mentionSegment.id = u.id;
                    messageInput.messageSegments.add(mentionSegment);
                    textSegment = new ConnectApi.TextSegmentInput();
                    textSegment.text = '!';
                    messageInput.messageSegments.add(textSegment);
                    ConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput();
                    input.body = messageInput;

                // POST FILE_FEED_ITEM
                    ConnectApi.NewFileAttachmentInput fileIn = new ConnectApi.NewFileAttachmentInput();
                    fileIn.title ='Wishes!'; 
                    fileIn.description = '';
                    Input.attachment = fileIn;
                    string contentType='image/jpeg';
                    ConnectApi.BinaryInput feedBinary = new ConnectApi.BinaryInput(Decodedbody,contentType, 'Wishes!.jpg');
                    
                // PARAMETERS(communityId, feedType, subjectId, input,filebody);
                    ConnectApi.ChatterFeeds.postFeedItem(null,ConnectApi.FeedType.Record,group.id,Input, feedBinary);
                
              }
        }
    }

 

Thanks in advantage for any advice.

BR.

 

 

 

 

 

 

 

  • June 19, 2013
  • Like
  • 0

is there a way in the chatter api to get the feed of a specific group?

 

for example,

 

/services/data/v28.0/chatter/feeds/groups/{group id}/feed-items

(where {group id} is the id of the group - either the sobject id, or the id obtained from the result of /services/data/v28.0/chatter/groups)

 

gives an "invalid subject identifier" error.

 

is there a way to get this without resorting to soql queries?

  • May 14, 2013
  • Like
  • 0