Exemple #1
0
 public function testItemsGetInfoMultiNotThere()
 {
     $coreClient = new RingsideRestClient($this->fbClient);
     $coreClient->items_setInfo(123, 'http://localhost/foo.jpg', 'http://localhost/foo.html');
     $coreClient->items_setInfo(345, 'http://localhost/bar.jpg', 'http://localhost/bar.html');
     $info = $coreClient->items_getInfo(array(123, 234));
     $this->assertTrue(is_array($info), "Expected an array of item info, got {$info}");
     $this->assertEquals(1, sizeof($info));
     $this->assertEquals('http://localhost/foo.jpg', $info[0]['url']);
     $this->assertEquals('http://localhost/foo.html', $info[0]['refurl']);
 }
Exemple #2
0
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 ******************************************************************************/
require_once('ringside/core/client/RingsideRestClient.php');
require_once('config.php');

$server_url = "http://api.facebook.com/restserver.php";
$web_url = 'http://www.facebook.com';
try {
require_once('ringside/api/clients/RingsideApiClients.php');
$fb = new RingsideApiClients($api_key, $secret, $web_url, $server_url);
$ringside = new RingsideRestClient($fb->api_client);

$loggedinuser = $fb->require_login();
$fb->api_client->friends_get();

	$ringside->items_setInfo('testitem', RingsideRestClient::$server_url, 'http://'.$_SERVER['HTTP_HOST']);
	$item = $ringside->items_getInfo('testitem');
	if ($item) {
?>Test Passed<?
$ringside->items_remove('testitem');
	} else {
?>Test FAILED<?
	}
} catch ( Exception $e ) {
?>Test EXCEPTION<br><pre><?php
echo $e->getMessage()."\n";
echo $e->getTraceAsString();
}
?></pre>