Friends_interests/likes/etc 从 Facebook Graph API 返回为空白

发布于 2024-11-02 01:00:21 字数 739 浏览 1 评论 0原文

我一直在摆弄图形 API,并且能够很好地访问我自己的信息。但是,当我尝试类似的操作时:

https://graph.facebook.com/999999/likes ?access_token=xxx (其中 999999 是朋友的 ID)

我得到一个空白图表,如下所示:

{ “数据”: [

] 请记住,

我暂时都是手动完成这一切。这是我用来向我的个人资料请求权限的 URL:

https://www.facebook.com/dialog/oauth?client_id=xxx&redirect_uri=http://www.google.com&scope=email, read_stream,offline_access,user_likes,friends_likes

一切都很顺利,我得到了我的访问代码,但我仍然收到空白图表。建议?

谢谢。

I've been messing around with the graph API and have been able to access my own information just fine. However, when I attempt something like:

https://graph.facebook.com/999999/likes?access_token=xxx (where 999999 is a friend's ID)

I get a blank graph like so:

{
"data": [

]
}

Keep in mind I'm doing this all manually for the time being. This is the URL I used to request permission from my profile:

https://www.facebook.com/dialog/oauth?client_id=xxx&redirect_uri=http://www.google.com&scope=email,read_stream,offline_access,user_likes,friends_likes

It all works hunky-dory and I get my access code, yet I still receive the blank graph. Suggestions?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

俏︾媚 2024-11-09 01:00:21

你有尝试过多个朋友吗?您的朋友可以配置第三方应用程序可以访问他们的哪些信息。例如,如果我们是朋友,我可以限制您使用的应用程序看不到有关我的任何信息。

您也可以查看帐户 -->隐私-->设置-->应用程序并查看您的应用程序实际上是否具有您认为您作为用户授予它的权限。

-凯文

Have you tried multiple friends? Your friends can configure what information third party applications can have access to, of theirs. For example I could limit applications that you use to not see anything about me, if we were friends.

Also you could check in account --> privacy --> settings --> applications and see if your application in fact has the permissions you think you granted it as a user.

-Kevin

等待我真够勒 2024-11-09 01:00:21

我同意凯文的观点。您需要先请求权限才能获取信息,并且您还需要做好准备您将得到一个空白列表。

我建议您使用已经构建的 api,因为它会节省您很多时间。我最近在此处发布了一个,应该可以让您立即上手。

代码如下所示:

Dim FB As New SessionInfo("[access_token]")
Dim Req = New Functions.Requests(FB)
Dim U = Req.GetUserInfo("[userid for friend]")
Response.Write(U.name)

此外,您还可以通过调用以下命令来获取朋友列表

Dim FL = Req.GetFriends()
For Each F In FL
    Response.Write(F.name)
Next

I agree with kevin. You need to request permissions first to get at the info and you also need to be prepared that you will get a blank list.

I suggest that you use an already built api as it will save you a lot of time. I've recently released one here that should get you going in no time at all.

The code looks like this:

Dim FB As New SessionInfo("[access_token]")
Dim Req = New Functions.Requests(FB)
Dim U = Req.GetUserInfo("[userid for friend]")
Response.Write(U.name)

Also you can get a list of friends by calling this

Dim FL = Req.GetFriends()
For Each F In FL
    Response.Write(F.name)
Next
贩梦商人 2024-11-09 01:00:21

我注意到,即使应用程序可以请求(并被授予)某些权限,例如访问“喜欢”,但这并不一定意味着应用程序能够访问此信息。

我对此不是 100% 确定,但可能有两种情况,例如请求用户喜欢会导致空数据集,即使用户请求并授予了正确的权限:

  1. 用户已设置自定义权限在他/她的隐私设置中
    不公开信息(例如“喜欢”)。基本上都是定制的
    权限设置推翻了授予的权限
    已请求应用程序。

  2. 用户未满 18 岁。 https://www.facebook.com/help/?page=214189648617074" rel="nofollow">https://www.facebook.com/help/? page=214189648617074

I have come to notice that even though an application can request (and be granted) certain permissions, e.g. to access Likes, it doesn't necessarily mean that an application will be able to access this information.

I'm not a 100% certain of this but there might be two instances where e.g. requesting a users Likes results in an empty data set even though the right permissions where requested and granted by the user:

  1. The user has set custom permissions in his/her privacy settings
    not make public the information (e.g. Likes). Basically, customized
    permission settings overrule the granted permissions that an
    application requested.

  2. The user is under 18. https://www.facebook.com/help/?page=214189648617074

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文