的價值這是一個後續到:的Facebook C#SDK:移動JsonArray至獲取跟蹤數據
(OAuthException) (#15) The method you are calling must be called with an app secret signed session
C# equivalent of file_get_contents (PHP)
Facebook API: Can I Invite A Test User To My Application?
所以我在最後一步現在。一旦邀請用戶接受邀請,我設法邀請用戶並獲取請求信息。現在我需要遍歷結果對象(JsonArray)並獲取數據字段的值,這是與Request Dialog
發送的跟蹤數據我嘗試過使用點語法來遍歷對象和其他一些東西,但我無法得到它。因此,這裏是我的代碼(不工作):
dynamic requestInfo = fb.Get("/me/apprequests/");
if (requestInfo.data.Count > 0)
{
//var c = requestInfo.data.data;
var a = requestInfo[0]["data"];
ViewData.Add("TrackingData", "the value");
}
而這裏的結果:
{ 「數據」:[{ 「ID」: 「1001200425907」, 「應用程序」:{ 「名」: 「MyFirstTestApp」, 「ID」: 「193005690721590」}, 「要」:{ 「名」: 「瑪格麗特 Diibjcfhg
Sadansteinskymanbergwitz」, 「ID」: 「499203687」}, 「從」: {「name」:「Nancy Diibjcfhf
Changwitz」,「id」:「499203686」},「daた 「:」 someCode」, 「消息」: 「邀請 到測試 應用」, 「CREATED_TIME!」: 「2011-05-
18T09:31:40 + 0000」}]}
我不熟悉C#,但你有沒有嘗試requestInfo [「data」] [0] [「data」]? – 2011-05-18 10:26:18
@echeese:我不能夠感謝你!這實際上工作!你可以發佈這個答案,以便我可以接受它嗎? :) – Kassem 2011-05-18 10:41:12