-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
32 lines (27 loc) · 993 Bytes
/
example.php
File metadata and controls
32 lines (27 loc) · 993 Bytes
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
26
27
28
29
30
31
32
<?php
require_once('./FriendFeed.class.php');
$ff = new FriendFeed('dotevan', include 'api_key.inc');
if($ff->validate()) {
$message = new FriendFeedMessage();
$message->setBody('This is a message from the FriendFeed class.');
if(($entryData = $ff->postEntry($message))) {
echo "I created the entry!\n";
$message = new FriendFeedMessage();
$message->setEntry($entryData->id)->setBody('This is the comment that I am adding!');
if(($commentData = $ff->postComment($message))) {
echo "I created the comment!\n";
} else {
echo "I was unable to create the comment.\n";
}
$message = new FriendFeedMessage();
$message->setEntry($entryData->id);
if($ff->deleteEntry($message)) {
echo "I deleted the entry!\n";
}
} else {
echo "I was unable to create the entry.\n";
}
} else {
echo "Unable to validate the user via the api key.\n";
}
echo "Done!\n";