Question

In Javascript I am able to retrieve a large number of statuses by doing this:

function buildObject() {
    FB.api('me?fields=statuses.limit(100).fields(message,from)', function(response) {

However, when I try to do the same in Python, it gives me an error about a valid access token. But when I remove the modifier it works, so I'm not sure what the problem is.

def findStatuses():
    print "digging through the Facebook API"
    graph = facebook.GraphAPI(accessToken)
    statuses = graph.get_connections("me", "statuses.limit(100)")
    for entry in statuses['data']:
        post = entry["message"]
        print post.encode("utf-8")

Is there a proper way to use modifiers that I am not doing?

No correct solution

OTHER TIPS

Disregard. It should be

    statuses = graph.get_connections("me", "statuses", limit=100)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top