Getting Group Names

Nov 4, 2007 at 3:36 AM
I'm having a bit of trouble. I am trying to get all the names of the groups that the user belongs to.

Dim x As New Facebook.Entity.Group
For Each x In fbs.GetGroups()

That is my code. I am getting a "Parser error: unexpected end of query."

Any help would be great.

Much thanks!
Nov 4, 2007 at 3:41 AM
Got it.

Dim groups As Collection(Of Facebook.Entity.Group) = fbs.GetGroups("user_id")
For i As Integer = 0 To groups.Count - 1
Nov 4, 2007 at 4:51 AM
Nice. I do that all the time -- inspiration hits 2 mins after I ask something.
Nov 5, 2007 at 2:03 PM
FYI, I believe that "unexpected end of query" error you were seeing was a bug in the toolkit which has been fixed and will be going into the new release. So the code you first used should have worked if we didn't have that bug. Just thought you'd like to know.
Nov 6, 2007 at 2:26 AM
It's not working now.

Did Facebook change something with the groups around today?
Nov 6, 2007 at 3:04 PM
Over the weekend Facebook reverted back to an older build of the API on their servers (, but everything still seems to work for me.

One thing I did notice while testing, though, is that if you are using FacebookService.UserId as a parameter to GetGroups, it will be null if you haven't connected to Facebook yet. Could that maybe be your problem?
Dec 9, 2007 at 3:01 PM

This thread helped me loads.