Может ли кто-нибудь предоставить мне некоторую информацию по интеграции FriendFeed API - PullRequest
0 голосов
/ 27 июня 2011

Интеграция FriendFeed API с PHP, как мне этого добиться.Я занимаюсь разработкой веб-сайта, где я хочу интегрировать FriendFeed ..

Ответы [ 2 ]

2 голосов
/ 27 июня 2011

Проверьте этот пример кода

include("friendfeed.php");
include("JSON.php");

//Connect
$friendfeed = new FriendFeed("yourusername", "yourpassword");

//Sample code to post data via the API
$entry = $friendfeed->publish_message("Testing the FriendFeed API");

//Sample PHP code to get data for a specific users feed via the FriendFeed API
//The below gets the first 30 entries in that users feed

$feed = $friendfeed->fetch_user_feed("some_random_user_name", 0, 0, 30);
foreach ($feed->entries as $entry) {
 //get the image of the service, and its name (eg twitter, googlereader...)
 $output .= '<img src="' . $entry->service->iconUrl . '" alt="'. 
 $entry->service->name . '" />';

 //get the title of the entry and link to it
 $output .= $entry->service->name.'<a href="'.$entry->link.'">'.
 $entry->title.'</a>';

 //get the date of the entry
 $output .= date('Y m d', $entry->published);

}

 echo $output; //prints the entry title, icon and link to the entry

Здесь является источником для дальнейшего использования.

0 голосов
/ 27 июня 2011

Пожалуйста, проверьте эту ссылку, она может помочь вам получить желаемый результат интеграции FriendFeed ..

http://code.google.com/p/friendfeed-api/wiki/ApiDocumentation

...