gpt4 book ai didi

c# - 在 Facebook c# sdk 中转换从调试 token 提交的 expires_at

转载 作者:太空宇宙 更新时间:2023-11-03 13:42:55 25 4
gpt4 key购买 nike

你好,我通过 debug_token 得到了一个 JsonObject,我需要知道什么是 expires_at/issued_at(什么是 dataType) 以及如何将其转换为 C#DateTime

只是我需要知道 Facebookexpires_at 是什么意思。是它死亡的时间(秒/分钟)还是正确的时间格式(DateTime)
我正在使用 Facebook C# SDK

我得到的JSON数组是:

{
"data": {
"app_id": *********,
"is_valid": true,
"application": "MyApp1",
"user_id": *********,
"issued_at": 1367606488,
"expires_at": 1372790488,
"scopes": [
"create_note",
"manage_notifications",
"photo_upload",
"publish_actions",
"publish_stream",
"read_stream",
"share_item",
"status_update",
"user_about_me",
"user_photos",
"video_upload"
]
}
}

最佳答案

这是 token 到期的时间,在 Unix Time 中格式,如上所示:

Unix time (also known as POSIX time or Epoch time) is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds. It is used widely in Unix-like and many other operating systems and file formats. Because it does not handle leap seconds, it is neither a linear representation of time nor a true representation of UTC. Unix time may be checked on most Unix systems by typing date +%s on the command line.

查看有一个有用的网站可以将此数字转换为可读日期:

http://www.epochconverter.com/

关于c# - 在 Facebook c# sdk 中转换从调试 token 提交的 expires_at,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16371002/

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