문제

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