Playing around with the java restFB wrapper and I tried requesting all photos from a certain user.
Everything works fine when I use the request https://graph.facebook.com/me/photos, except I am limited to 25 photos. The solution to this is to add the limit field and set it to 0.
So I retried it using the request https://graph.facebook.com/me/photos?limit=0, and this time I am hit with the error "Received Facebook error response of type OAuthException: A user access token is required to request this resource. (code 102, subcode null)" I am wondering if a different Oauth key is needed to get all photos. I am currently getting my key by creating a facebook app.
Thanks!
You should not set a unlimited limit (
limit=0
) when making API calls, or it will result is very large results and very long execution times. Instead, you should work with the 25 photo limit or set a reasonable limit (e.g. 100 photos) and use pagination to get the next set.At the end of the result set, you'll see something like:
You can use these to make a subsequent API call to get the next set of photos.