如何通过Facebook Graph Api在他的生日通过用户的朋友贴在用户墙上的帖子? [英] How to get posts that user's friend posted on the wall of user on his birthday through Facebook Graph Api?

查看:134
本文介绍了如何通过Facebook Graph Api在他的生日通过用户的朋友贴在用户墙上的帖子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个Chrome扩展程序,并希望得到人们在他的生日专门发布的所有帖子。

I am trying to build a Chrome extension and I want to get all the posts that people posted on the user's wall specifically on his birthday.

我试图打电话通过Facebook Javascript SDK,但它不是返回我的朋友在生日发布的帖子。

I tried to call through Facebook Javascript SDK, but it is not returning the posts that are posted by my friends on the birthday.

FB.api(
  '/me/feed',
  'GET',
  {},
  function(response) {
      // Insert your code here
  }
);

相反,它将在一个帖子中返回所有生日帖子:

Rather, it is returning all the birthday posts in one post like this:

{
      "message": "Belated happy birthday bhaiii.....",
      "created_time": "2015-10-19T00:02:02+0000",
      "id": "578828115566706_848912165224965"
    },
    {
      "story": "Ritwik Jain and 40 others wrote on your Timeline.",
      "created_time": "2015-10-18T03:59:39+0000",
      "id": "578828115566706_848604468589068"
    },

如何单独获得每个帖子?

How do I get each post individually?

提前感谢。 / p>

Thanks in advance.

推荐答案

你发现, / me / feed 当然,您需要使用 user_posts 权限。 Facebook将生日帖放在一起,但似乎没有其他办法可以发帖。意思是没有办法单独获取生日贴。

As you found out, the /me/feed endpoint is what you need to use - with the user_posts permission, of course. Facebook puts birthday posts together as it seems, but there is no other way to get the posts. Meaning, there is no way to get the birthday posts separately.

用户墙的端点: https://developers.facebook.com/docs/graph-api/reference/v2.5/user/feed

这篇关于如何通过Facebook Graph Api在他的生日通过用户的朋友贴在用户墙上的帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆