<p>Social Networking plaftorms are often built around the concept of feeds. XMPP offers, through &xep0060;, a really generic way of Publishing and Subscribing elements on XMPP nodes. This extension defines a way to publish social content on Pubsub nodes using &rfc4287;</p>
<p>Social features in XMPP were historically built on the &xep0277; specifications. However, in practice, Microblogging was not clearly defined in more common cases such as on generic Pubsub nodes and it was not easy to differentiate social nodes from the other ones. The current XEP defines a more generic way of handling Social Feeds on XMPP by declaring a secific pubsub#type for those Pubsub nodes and by keeping &xep0277; as a subset of it.</p>
<p>If an entity implements Pubsub Social Feed, it MUST specify the 'urn:xmpp:pubsub-social-feed:1' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.</p>
<p>If the entity is also implementing specific profiles, it MUST expose the specific feature defined in the related Pubsub type.</p>
<examplecaption='The entity responds with specific features profiles'><![CDATA[
A Pubsub Social Feed can be located on any Pubsub node on the XMPP network. Some specific use cases, such as the personal eventing (PEP) node Microblog is defined in the
<section2topic='Publishing a Post'anchor='publish'>
<p>The publication of a Post consist of a valid &rfc4287; entry embeded in a &xep0060; item.</p>
<p>The post content itself can be either text (content element without "type" attribute or with "type" attribute with "text" value) or XHTML ("content" element "type" attribute with "xhtml" value). If Romeo publishes XHTML content, his client MUST publish two "content" elements: a text one, and a XHTML one. For XHTML publishing, see &xep0060;.</p>
<p>Note: The "title" element is required to be included in an "atom:entry" element according to &rfc4287;. An implementation MAY provide also "atom:summary" and/or "atom:content" elements too if it needs.</p>
<section3topic="Publishing a Post with Rich Content"anchor="rich_content">
<p>It's possible to insert some rich content in the post. It can be some text formatting, images, etc. Only "xhtml" content type is supported for the moment by this document but possibly it will be extended later.</p>
<examplecaption="Publishing a post with rich content"><![CDATA[
Because Juliet is subscribed to some Romeo's family Pubsub service nodes. Romeo's XMPP server will send a Pubsub notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with Jabber clients that are not pubsub-capable (see
<p>Note: these alternate links were not posted by the original client because some clients can't compute them themselves. These things SHOULD be inserted at server side though.</p>
</section2>
<section2topic='Replying to a Post'anchor='reply'>
<p>Anyone can publish a post in reply to Romeo's post. Here we assume that a reply comes from Benvolio.</p>
<p>Note: Inclusion of the "thr:in-reply-to" element defined in &rfc4685; indicates the post to which the user is replying. This reply includes two such elements (one pointing to the HTTP URL for the post and the other pointing to the XMPP URI for the post.</p>
<p>Note: The post can be a reply to more than the only one another.</p>
<p>Assuming that Romeo has also subscribed to the same node he will receive the reply that Benvolio sent.</p>
</section2>
<section2topic='Repeating a Post'anchor='repeat'>
<p>When Benvolio wants to repeat a Romeo's post, his client publishes the same post under a different name. But to be able to track the repeated post original author, Benvolio's client MAY use specific "atom:author" child node, "atom:name" and "atom:uri", containing, respectively, the name of the original post author, and his XMPP URI (JID).</p>
<p>The client SHOULD also put an "atom:link" element with "rel" attribute set to "via" and point it to the original post.</p>
<p>Thus, a different author JID value lets the client know the item has been repeated from another one.</p>
<p>It's also possible for Benvolio to add his own thougths to the repost. To do this he SHOULD wrap the original content in the "xhtml:blockquote" element and after it add his own content. Also, the client MAY post reply without quotation to the original thread to inform users about the repost.</p>
</section2>
<section2topic='Atom and XMPP integration'anchor='atom_xmpp_integration'>
<section3topic="Pubsub Item ID vs. Atom Entry id"anchor="pubsub_id_vs_atom_id">
<p>There are two different things that carry a similar sense: the XMPP Pubsub Item ID and the "atom:id" element. This section is devoted to make a separation between them.</p>
<p>The pubsub Item ID MUST be used when linking to an entry with an XMPP channel (i.e. by including it in the URI with the "xmpp" schema). the Atom entry ID MUST be built according to &rfc4287; and used in aggregators with the aim of revealing of post duplicates, reposts, mentions, syndications, etc.</p>
<p>Note that the rules of comparing, building and security notes for "atom:id" are listed in the &rfc4287;.</p>
<p>Depending on service policies and the value of the "pubsub#include_body" node configuration option, Pubsub Social Feed notifications SHOULD include a message "body" element for backwards-compatibility with Jabber clients that are not pubsub-capable. It is RECOMMENDED for the XML character value of the "body" element to be the same as that of the "atom:title" child of the "atom:entry".</p>
<p>Juliet may want to know which places are Romeo's notices related to. That's why Romeo's client MAY geotag microblog entries, using the &xep0080; protocol for storing geolocation information.</p>
<p>Romeo's client MUST create a "geoloc" element, with the &xep0080; reference namespace: "http://jabber.org/protocol/geoloc".</p>
<p>Pubsub Social feeds are specified under profiles. Those profiles are constraints applied to nodes and defined by a specific Pubsub type (see &xep0060;#registrar-formtypes-metadata)</p>
<p>This profile is specified by the Pubsub type "urn:xmpp:pubsub-social-feed:1" and define a generic Pubsub Social Feed that can be hosted on any Pubsub service node or &xep0163; node.</p>
<li>The "pubsub#notify_retract" MUST be set to "true" to provide clients the ability to track if some items were retracted and reflect such changes in the UI correctly.</li>
<li>The "pubsub#max_items" MUST be set to the "max" value, as defined in the &xep0060;.</li>
<li>The "pubsub#persist_items" MUST be set to "true".</li>
<li>The "pubsub#send_last_published_item" SHOULD be set to "never".</li>
<li>The "pubsub#deliver_payloads" SHOULD be set to "false". The social content can be quite large so it is advised to let the clients to manually query the content if it is not already cached.</li>
<p>This profile is defined by the Pubsub type "urn:xmpp:microblog:0" as defined in &xep0277; and MUST be created and configured under the PEP "urn:xmpp:microblog:0" node.</p>
<p>All the items published in a gallery node MUST only have at least one attached picture. This picture MUST be of type "enclosure" as specified in &rfc4287;.</p>
<examplecaption="An Atom attached picture"><![CDATA[