开发者

How to use feedparser to retrieve notifications from Facebook?

开发者 https://www.devze.com 2023-02-11 04:34 出处:网络
I have to show the number of notifications(using the rss feeds) on an external device and thus wante开发者_运维百科d to retrieve the same using feedparser.I\'m not sure what you mean by \"external dev

I have to show the number of notifications(using the rss feeds) on an external device and thus wante开发者_运维百科d to retrieve the same using feedparser.


I'm not sure what you mean by "external device" but the code I used for retrieving notifications is

def getFB(posts, ID, key):
    f = feedparser.parse("http://www.facebook.com/feeds/notifications.php?id=" + ID + "&viewer=" + ID + "&key=" + key + "&format=rss20");
    print "Here are the latest facebook posts. ";
    fi = 0
    while fi<posts:
        print f.entries[fi].description;
        fi = fi + 1;
0

精彩评论

暂无评论...
验证码 换一张
取 消