forked from kga245/echo-php-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
25 lines (19 loc) · 1017 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
A php library for interacting with the Echo platform. This library includes Echo API methods, OAuth authetication, a web GUI, and convert RSS to ActivityStreams functions.
Requirements:
PHP
Echo API key
Make use of:
ActivityStreams PHP Library (optional) - http://github.com/jonnyjon/ActivityStreams-PHP-Library
SimplePie Library (optional) - http://simplepie.org/
Usage:
// Submit Data to Echo Platform
require ('/lib/EchoLib.inc');
$EchoLib = new EchoLib($consumer_key, $consumer_secret); // create object
$rsp = $EchoLib->method_submit($data); // submit ActivityStreams data to the Echo platform
// Convert RSS to ActivityStreams
require ('/lib/EchoLib.inc');
$data = file_get_contents('http://search.twitter.com/search.atom?q=star+trek'); // get rss/atom data
$streamy = new ActivityStreams(); // create object
$rsp = $streamy->rss_to_activity_streams($data); // convert data
header('Content-Type: application/xml; charset=utf-8'); // set the content type
echo $rsp; // convert to string and print to screen