Skip to main content
A GIF often says in one tap what a reply would take a sentence to type: a laugh, a cheer, a shrug. GIF comments let your users answer a post or another comment with a GIF that stays animated, the way they already react in other apps. You keep the GIF experience you choose. Your app uses its own GIF provider, such as GIPHY, with that provider’s search and content filters, and social.plus stores only the GIF’s link and size. A GIF comment is a regular comment: it comes back in comment queries, you can filter for it by the gif data type, and moderators review and remove it in the social.plus Console like any other comment. Your app picks the GIF from its provider and passes the GIF link to the SDK. The SDK sends the link and the GIF size to social.plus. The SDK does not upload the GIF and does not load it. Your app loads and shows the GIF.
GIF comments are available in the Android, iOS, and TypeScript SDKs. This page has samples for these three platforms only.

Parameters

GIF attachment fields

The GIF host must be on the network’s link allowlist. See Allowlist Management. The SDK does not check these rules. The SDK sends the values unchanged, and social.plus refuses a GIF that breaks a rule. See Errors.

Create a GIF comment

Build a GIF attachment from the link that your GIF provider returns. Pass the attachment to the comment creation API. Add text when the user typed text. The returned comment has gif in its data types. The comment also has text in its data types when it has text. To create a comment with only a GIF, leave out the text on Android. On iOS, pass an empty string as text. On TypeScript, leave out data.

Reply with a GIF

Set parentId to the ID of the comment that gets the reply. A reply follows the same GIF rules as a top-level comment.

Read the GIF on a comment

Read the GIF from the comment attachments. The width and the height are null on Android, nil on iOS, and undefined on TypeScript when the comment has no size.
A deleted GIF comment keeps gif in its data types. The server returns it with no attachments. Right after a delete, the local copy of the comment can still hold the GIF until the next read. Check that the comment is not deleted before you show a GIF.

Replace or remove the GIF

Edit the comment attachments to change the GIF. The examples below replace the GIF.
A community can require review for comment edits. See Edit Comment for the review rules.

Query GIF comments

Set a data type filter with gif to show only comments that hold a GIF. An exact filter matches the data types as a set. The order of the values does not matter.

Errors

The SDK returns a GIF error to your app unchanged. The SDK does not retry the request. With optimistic creation on, a refused create keeps the local comment in a failed state. Your app can offer a retry.

Notes

  • A GIF comment holds one GIF and no other attachment. To show an image, create an Image Comment.
  • Realtime comment events carry the GIF in the comment attachments. No GIF-specific event exists. See Social Realtime Events.

Image Comment

Create comments with uploaded image attachments.

Query Comments

Query top-level comments, replies, and data types.

Edit Comment

Update comment text, metadata, and attachments.

GIF Posts

Add GIFs to posts.