本文介绍了来自我朋友的Open Graph内置动作(例如video.watches或news.reads)始终为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图从我的朋友那里获取所有video.watches

I am trying to get all video.watches from my friends with

https://graph.facebook.com/me/friends/video.watches?access_token=<valid_token>

我的访问令牌同时具有user_actions.videofriends_actions.video权限.我得到空结果:

My access token has both user_actions.video and friends_actions.video permissions.And I get empty result:

{
"data": []
}

我的一个ID为100000291284354的朋友曾经用Vevo应用程序观看过视频,

While a friend of mine with id 100000291284354 has watched videos with Vevo app and when I do

https://graph.facebook.com/100000291284354/video.watches?access_token=<valid_token>

我得到了这些视频.与news.reads相同(如果输入朋友ID,我可以得到新闻,而通过/me/friends/进行请求时却得到空结果)

I get these videos.The same with news.reads (I can get the news if I put the friend id, while get empty result when I request via /me/friends/)

有什么问题吗?

推荐答案

我认为这是正确的操作.或者我想相信.

I believe that's the correct action. Or I would want to believe so.

user_actions.video应该仅授予me/video.watches ,而friends_actions.video应该授予friend_id/video.watches.一种有效的检查方法是放弃friends_actions.video权限,然后使用您提到的用户ID再试一次.但是,为什么要结束/me/friends/video.watches?

user_actions.video should grant me/video.watches only and friends_actions.video should grant friend_id/video.watches. A valid way to check would be to drop the friends_actions.video permission and try again with the user id you mentioned. But then why is there an end /me/friends/video.watches?

我认为该端点不应该存在.看来您可以将video.watches路径附加到某些图形调用的末尾,并且它将以一个空数组(与您获得的分页链接相对)静默失败

I don't think this endpoint should exist. It seems you can attach video.watches path to the end of some graph calls and it will silently fail with an empty an array as opposed to the pagination link you are given

{
  "data": [
  ], 
  "paging": {
    "next": "pagination_url"
  }
}

亲自尝试(在我的情况下,我是通过music.listens尝试的)

Try it yourself (in my case I tried it with music.listens)

  • /me/photos/music.listens-调用/me/photos
  • 失败
  • /me/likes/music.listens-错误100
  • /me/friends/music.listens-由于空数组而完全失败
  • /me/photos/music.listens - Silently fails with call to /me/photos
  • /me/likes/music.listens - Error 100
  • /me/friends/music.listens - Silently fails with empty array

其余部分在无效路径组件下的行为均符合预期,因此第二个猜测可能是这些路径中有一些是错误的.

The rest behave as expected with invalid path components so a second guess would be some of these paths are bugs.

所以,我认为您无能为力,您认为自己无能为力.一次抓住您朋友的所有活动.

So, I don't think you are able to do, what you think you can do; grab all the activity of your friends all at once.

这篇关于来自我朋友的Open Graph内置动作(例如video.watches或news.reads)始终为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 11:52