AppRequests?

Oct 26, 2011 at 6:21 AM

I'm trying to get application requests for the current user, posted by any apps.

This is returning no data, though I know there are hundreds of requests published by friends in their apps for this user:

IList<AppRequest> requests = FB.User.GetAppRequests(userID , Api.AccessToken , null , null);

That goes down to a new Helpers.ApiCaller method I've added to my current development library:

internal static IList<AppRequest> GetAppRequests( string ID , string AccessToken , int? Offset , int? Limit )
{
    IList<AppRequest> AppRequests = new List<AppRequest>();
    string URL = FormatConnectionURL("apprequests" , ID , AccessToken , Offset , Limit);
    string response = Helpers.WebResponseHelper.GetWebResponse(URL);
    JsonObject JO = new JsonObject(response);
    JsonArray dataArray = (JsonArray) JO[ "data" ];
    foreach ( JsonObject AppRequestJO in dataArray.JsonObjects )
    {
        AppRequests.Add(new AppRequest(AppRequestJO));
    }
    return AppRequests;
}

The response is an empty data set.  So, following recent discussions here I tried FQL:

JsonArray JA = Api.Fql(
    "SELECT recipient_uid, request_id, app_id FROM apprequest" +
       " WHERE recipient_uid = " + userID +
       " AND app_id = " + appID
     );

That also returned an empty set.

I know Facebook made changes in this area just a few months ago. Maybe we're not passing in the right application token?

Remember that I want requests sent to this user from other apps.
I don't want requests posted by this app for this user or any other.
I'd prefer to not have to specify the appID. By definition, if I'm looking for all of them I might not know what apps have sent this user requests.

Any ideas?  I see a number of questions about this in stack overflow too, but no suggestions there are working now. Unless we can find a solution here I'll post something there.

BTW, since we're here, FGT has a AppRequest property Sender that uses data["from"] as it's source.  The field "from" is not defined for the apprequest table.

Thanks!