Get Users of my App

Aug 15, 2007 at 9:20 PM
I've been storing my users in a database and using setFBML to update my application. At some point in time, my database went down and upon counting the Facebook Number of users and my Count in my DB, I'm missing about 3 users.

Is there anyway I can get a list of users of my application, whether it be brute force?

I'm looking at IsAppAdded() but I can't find much information about it, also since it is tied to FacebookService, I'm stuck checking anyone but me.

Any help?
Aug 28, 2007 at 3:37 PM
I'd like to do the same thing, has anyone figured out how?

There's an application called Appsaholic that shows aggregate numbers for all the FB apps, but I can't figure out how they do that either.

Thanks!
Feb 6, 2008 at 4:41 AM
I"m trying to get a list of users who've added also?
Is there a way to query or method to just list all users that have added the app?
Feb 12, 2008 at 11:49 AM
You can use facebooks query language to do this...

public string GetFacebookApplicatinUsers(long facebookUserId, Facebook.Components.FacebookService fbService)
{
string fql, xml, friends = "";

try
{
fql = "SELECT uid FROM user WHERE hasaddedapp = 1 AND uid IN (SELECT uid2 FROM friend WHERE uid1 ='" + facebookUserId + "')";

xml = fbService.DirectFQLQuery(fql);

DataSet ds;
System.IO.StringReader myXMLreader = new System.IO.StringReader(xml);
DataView dataView;

ds = new DataSet();
ds.ReadXml(myXMLreader);

if (ds.Tables"user" != null)
{
dataView = new DataView(ds.Tables"user");

foreach (DataRow row in dataView.Table.Rows)
{
friends += row"uid".ToString() + ",";
}

if (friends.Length > 0)
{
friends = friends.TrimEnd(',');
//DataTable dtFriends = cls.GetData("Select * From fbDiziOylama Where UserID IN (" + friends + ")");
}
}

}
catch (Exception ex)
{
_errorNumber = -1;
_errorMessage = ex.Message;
}

return friends;



}


kennyma wrote:
I've been storing my users in a database and using setFBML to update my application. At some point in time, my database went down and upon counting the Facebook Number of users and my Count in my DB, I'm missing about 3 users.

Is there anyway I can get a list of users of my application, whether it be brute force?

I'm looking at IsAppAdded() but I can't find much information about it, also since it is tied to FacebookService, I'm stuck checking anyone but me.

Any help?

Feb 12, 2008 at 7:53 PM


ck1 wrote:
You can use facebooks query language to do this...

public string GetFacebookApplicatinUsers(long facebookUserId, Facebook.Components.FacebookService fbService)
{
string fql, xml, friends = "";

try
{
fql = "SELECT uid FROM user WHERE hasaddedapp = 1 AND uid IN (SELECT uid2 FROM friend WHERE uid1 ='" + facebookUserId + "')";

xml = fbService.DirectFQLQuery(fql);

DataSet ds;
System.IO.StringReader myXMLreader = new System.IO.StringReader(xml);
DataView dataView;

ds = new DataSet();
ds.ReadXml(myXMLreader);

if (ds.Tables"user" != null)
{
dataView = new DataView(ds.Tables"user");

foreach (DataRow row in dataView.Table.Rows)
{
friends += row"uid".ToString() + ",";
}

if (friends.Length > 0)
{
friends = friends.TrimEnd(',');
//DataTable dtFriends = cls.GetData("Select * From fbDiziOylama Where UserID IN (" + friends + ")");
}
}

}
catch (Exception ex)
{
_errorNumber = -1;
_errorMessage = ex.Message;
}

return friends;



}


Isn't that the same as Collection<Facebook.Entity.User> friends = _fbService.GetFriendsAppUsers(); ?

For both of those, that only returns app users that are friends of the current app user. I don't know how you get all users that have added your application if they are not friends of the user making the call to Facebook.