You need to sign in to do that
Don't have an account?
bdurette
Like using iOS toolkit
I'm trying to enable 'Like' functionality in my app using the iOS toolkit. The code I'm using is as follows:
-(void) like:(NSString *)messageId { ZKSObject *like = [[[ZKSObject alloc] initWithType:@"FeedLike"] autorelease]; [like setFieldValue:messageId field:@"FeedItemId"]; FDCServerSwitchboard *switchboard = [FDCServerSwitchboard switchboard]; NSArray *objects = [NSArray arrayWithObject:like]; [switchboard create:objects target:self selector:@selector(likeCreated:error:context:) context:nil]; }
The error message I'm getting is:
<__NSArrayM 0xd9454b0>(
INVALID_TYPE - sObject type 'FeedLike' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.
)
Is there something else I need to do to get "Likes" working?
Make sure you're using a recent API version (v20 and up i think)
If using the Chatter REST API is an option, try sending an HTTP POST request to https://na1.salesforce.com/services/data/v22.0/chatter/feed-items/{feedItemId}/likes and that should do it, assuming your instance is na1.salesforce.com -- adjust as necessary.