Phweet exposes functionality to enable Twitter clients to easily support Phweet telephony via an Application Programming
Interface (API). This document is a reference for that functionality,
and aims to serve as a reference for developers building tools that
talk to Phweet. Smart Links are the new way to talk. Phweet enables voice conversations through unique hyperlinks which expire when the session ends. It is a completely new form of telephony. A Phweet is a link to an external directory listing (like Twitter). Phweets simply enables voice conversations between two or more profiles without sharing any additional information between the parties. Today, Phweet exclusively supports Twitter although in the future, Phweet will support other such networks. Quick SummaryAdding voice telephony functionality to a Twitter client is made simple with the Phweet API. The API is used to create a Phweet URL which is a meeting place for participants to conduct voice communications. The client then sends the user to that URL like any other URL. This should be familiar to Twitter client developers, somewhat analogous to TinyURL type services.There are two options for developers to create the URL and setup the Phweet. There is a one-step approach and a two-step approach. In both cases, the goal is to instruct Phweet to setup a Phweet URL which consists of a "host" (caller) and a "recipient" twitter account, as well as a context for the request (what the conversations is about). The one-step process is essentially:
The two-step process is similar, but breaks the process down into two phases, first generating the Phweet URL, then initiating it fully with "context" (essentially the "body" of the tweet that gets sent by Phweet), as follows:
ReferenceMethodsphweeturl.xmlStarts a new Phweet and generates a corresponding Phweet URL. The Phweet URL is returned. URL: http://phweet.com/api/phweeturl.xml Parameters:
Notes:Requires HTTP POST request.If the context parameter is not provided, then the URL is created but it is not activated. The start.xml API below has to be used to finalized the instantiation of the Phweet URL in that case. The oneclick value may be used by the Twitter client to deliver the user directly to the Phweet URL, without requiring further sign-in. This URL should not be exposed directly to the user or in the Twitter stream - it for use by the client to send the user to the Phweet URL in the browser. This value is only returned if the context is provided, resulting in a live/active Phweet. The oneclick URL is only valid from the same IP address of the Twitter client making the API service call and is only active for 60 seconds. Example response:<?xml version="1.0" encoding="UTF-8"?> <phweet> <phweeturl>http://phweet.com/5xRy</phweeturl> <oneclick>http://phweet.com/oneclick.cgi?sid=A16211C0497B8998435791A615032F6E</oneclick> </phweet> start.xmlCreates a Phweet URL. The Phweet URL is returned.URL: http://phweet.com/api/start.xml Parameters:
Notes:Requires HTTP POST request.Example response:<?xml version="1.0" encoding="UTF-8"?> <phweet> <phweeturl>http://phweet.com/5xRy</phweeturl> <oneclick>http://phweet.com/oneclick.cgi?sid=A16211C0497B8998435791A615032F6E</oneclick> </phweet> phweetup.xmlCreates a new "undirected" Phweet and generates a corresponding Phweet URL. The Phweet URL is returned.URL: http://phweet.com/api/phweetup.xml Parameters:
Notes:Requires HTTP POST request.Phweets are normally directed to a specific individual, the recipient, and the Phweet live exchange does not begin until the recipient accepts the request. The phweetup.xml service creates a slightly different kind of Phweet exchange. An "undirected" Phweet is one that is not sent to any one in particular. It is created and immediately made active to others to join. It stays active until the host (creator of the Phweet) ends it. However, unlike normal (directed) Phweets, the "undirected" Phweet URL stays active if the host leaves (but does not "end") the Phweet URL. Participants may use the URL and continue their conversation even if the host is not present. All "undirected" phweets are "public" - that is to say they do not use "d" messages. Undirected Phweets can be started in "auto-accept" mode with the above "aa" parameter, where any visitor to the URL is "auto-approved" and immediately joins the Phweet. The host can still "kick" them out. Otherwise, normal request/approve controls are in place, where the host must approve (once) those users that want to join, the same way it works for normal Phweets. Hosts can also "invite" specific users to join, which essentially pre-approves those specific users. Example response:<?xml version="1.0" encoding="UTF-8"?> <phweet> <phweeturl>http://phweet.com/olVQ</phweeturl> <oneclick>http://phweet.com/oneclick.cgi?sid=A16211C0497B8998435791A615032F6E</oneclick> </phweet> Curl ExampleIf your system has curl (and it should!), you’ve already got a great way to test the Phweet API. Here is an example:
Discussion GroupJoin the Phweet Development Talk Google Group. Join the group, get help from Phweet and the developer community and help define the Phweet API. |