bobolounna / restfb

Automatically exported from code.google.com/p/restfb
0 stars 0 forks source link

Is it possible to fetch feeds of multiple users? #129

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to fetch facebook feeds from multiple users who's profile is 
public. 

I tried using the following techniques, but none of them worked..

1>  Post testFetch = facebookClient.fetchObjects(IdsList, Post.class);
---> In this case, I got the following output 
Post[actions=[] application=null attribution=null caption=null comments=null 
createdTime=null description=null from=null icon=null id=null likes=null 
likesCount=null link=null message=null metadata=null name=null picture=null 
privacy=null properties=[] source=null to=[] type=null updatedTime=null]

-------------------------------------------------------------------
2>  JsonObject testFetch = facebookClient.fetchObjects(IdsList, JsonObject);
---> In this case, I only got user details and not the feeds :(
-------------------------------------------------------------------
3> String constructURL = 
"https://graph.facebook.com/feed?&limit="+limit+"&ids="+listToCsv(userIdList);
Connection<JsonObject> testFetch = 
searchClient.fetchConnectionPage(constructURL, JsonObject.class);

---> In this case, I got a JsonMapper exception saying that It cant be mapped 
to the java object.
--------------------------------------------------------------------

Can anyone suggest a work around for this? 

Thanks in advance.

With Regards,
Bharath

Original issue reported on code.google.com by bharaths...@gmail.com on 25 Mar 2011 at 6:43

GoogleCodeExporter commented 8 years ago
See the section on http://restfb.com called "Fetching Multiple Objects in One 
Call".

If you do not know at compile time what the IDs are, then your solution #2 
should work correctly in that it will return the data exactly as Facebook 
provides it.  If you are seeing weird data, there is either a bug on Facebook's 
end or you're passing in ids for users (or something else) instead of posts.

Marking as invalid; this is really a question for the discussion group instead 
of a bug report.

Original comment by mark.a.a...@gmail.com on 31 Mar 2011 at 5:45