Вопрос

I have an app that allows users to send App Requests to friends. In the App Request, I pass in a custom value in the "data" property when launching the App Request dialog.

FB.ui({
   method: 'apprequests',
   message: 'check this out!',
   data: 'ah6Jdh74Glc9dj'  //random, unique value stored in the app request
}

When the friend lands on my web site from the app request, I can get the value of the "data" property from Facebook's Graph API when I know the request ID (which facebook passes in the querystring of the app request URL). I am doing this using the Facebook C# SDK:

var client = new FacebookClient(myAppAccessToken);
var url = string.Format("/{0}", friendAppRequestID);
var appReq = client.Get(url) as IDictionary<string, object>;

var customData = appReq["data"].ToString();

What I want to know is, how do I do a reverse-lookup, whereby I want to get a request ID from the "data" property?

Это было полезно?

Решение

What I want to know is, how do I do a reverse-lookup, whereby I want to get the request ID from the "data" property.

Not in Facebook’s database.

You’d have to save that info into your own database as soon as the request is send and you get the id back.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top