开发者

How to use feedparser to retrieve notifications from Facebook?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜