gpt4 book ai didi

facebook - 不允许使用全局 ID。请改用应用程序特定 ID

转载 作者:行者123 更新时间:2023-11-30 05:16:00 24 4
gpt4 key购买 nike

在图形 API 2.0 中

当我使用新的图形 API 访问我的 friend 信息时,我收到以下消息。

这里xxx是用户id。

{
"error": {
"message": "The global ID xxx is not allowed. Please use the application specific ID instead.",
"type": "OAuthException",
"code": 2500
}
}

什么是应用程序特定 ID?至少,文档中没有关于此的内容。(如果我使用 Graph API 1.0,一切都会好起来的。)

最佳答案

这是来自 a blog post 的摘录我写的这个主题回答了你的问题:

In the simpler days of v1.0, when the Graph API reported on a user, the id value it provided was a global id number for that Facebook user. These values were “global” in the sense that they could be shared between client applications. In v2.0, all user data provided by the /user endpoint and its children use application-specific ids. These ids are a unique identifier not just of the Facebook user, but of the client-user pair. This mean that you can’t share user ids between applications. (Though Facebook does provide an API for mapping between applications that are part of single organization.)

An important consequence of this fact is that the user ids recognized by the Facebook applications you use for development will not match the ones your production app recognizes. So, if you store your users’ Facebook ids in your database in production, you won’t be able to match up users in that database with data returned from the API in development. That’s annoying!

And there’s no way around it. You’ll just have to query for a few of your friends from the development app and manually overwrite their stored Facebook ids in your development database. This will give you a few exemplars to develop against.

关于facebook - 不允许使用全局 ID。请改用应用程序特定 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23439917/

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