gladiopeace / opensocial-php-client

Automatically exported from code.google.com/p/opensocial-php-client
Apache License 2.0
0 stars 0 forks source link

Twitter Support #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I would like to see Twitter support added. It supports OAuth, so the 
authentication shouldn't be an issue. I know Twitter doesn't support 
OpenSocial specifically, but a generic REST interface could be easily put 
in place. For example, to update the user's Twitter Status we'd make a 
call similar to this:

$osapi->rest_call->('https://twitter.com/statuses/update.xml', array
('status' => 'This is my brand new status'), 'POST');

Original issue reported on code.google.com by timrnich...@gmail.com on 17 Jun 2009 at 1:12

GoogleCodeExporter commented 9 years ago
While the OAuth and generic REST call would be nice, there really is no reason 
to 
not map the corresponding Twitter API's to the opensocial API's. Examples:

OpenSocial -> Twitter
People, Retrieve -> users/show, friends/ids (or statuses/friends since status 
is an 
opensocial person data element)
People, Update (if support added to osapi) -> account/update_profile
Activities, Retrieve -> statuses/show (@self, @friends, @all are appropriate 
here)
Activities, Create -> statuses/update (if in direct response to a Tweet 
directed to 
the user, then set parm in_reply_to_status_id and place @username in the 
activity 
title so show's in friend's direct mentions)
Activities, Delete (if support added to osapi) -> statuses/destroy
Messages, Retrieve -> directmessages/new, directmessages/sent (and possibly 
statuses/mentions and/or notifications/follow, notifications/leave)
Messages, Create -> directmessage/new

Note: There are no corresponding Twitter API's for AppData, but this is not an 
issue 
as these osapi's would be used primarily for pulling info from Twitter, 
updating 
status only, and sending direct messages. Those updates don't require AppData 
for 
that.

Original comment by timrnich...@gmail.com on 17 Jun 2009 at 4:15