谁能给我提供一些集成 FriendFeed API 的信息

发布于 2024-11-17 11:30:31 字数 74 浏览 3 评论 0原文

通过 PHP 集成 FriendFeed API,我怎样才能实现这一目标。我正在开发一个网站,我想在其中集成 FriendFeed..

Integrating FriendFeed API thorough PHP, How can I acheive that. I am developing a website where in i want to integrate FriendFeed..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

末骤雨初歇 2024-11-24 11:30:31

查看此示例代码

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

这里是进一步参考的来源。

Check out this sample code

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

Here is the source for further reference.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文