gpt4 book ai didi

c# - Facebook C# SDK : Traverse The JsonArray To Get The Value of Tracking Data

转载 作者:行者123 更新时间:2023-11-30 22:38:36 25 4
gpt4 key购买 nike

这是后续:

(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");
}

结果如下:

{"data":[{"id":"1001200425907","application":{"name":"MyFirstTestApp","id":"193005690721590"},"to":{"name":"Margaret Diibjcfhg

Sadansteinskymanbergwitz","id":"499203687"},"from":{"name":"Nancy Diibjcfhf

Changwitz","id":"499203686"},"data":"someCode","message":"Invitation to the test application!","created_time":"2011-05-

18T09:31:40+0000"}]}

最佳答案

你要找的数据在requestInfo["data"][0]["data"] 我用Firefox的JSONView插件帮我遍历结构给你答案,我推荐它来帮助您在未来解决此类问题。

关于c# - Facebook C# SDK : Traverse The JsonArray To Get The Value of Tracking Data,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6043025/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com