Facebook打开图表私人组Feed请求 [英] Facebook open graph private group feed request

查看:82
本文介绍了Facebook打开图表私人组Feed请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从图形API获取数据,特别是我尝试从一个组中获取时间轴。例如,让我们来看看fb开发人员概述中提供的请求...

I want to get data from graph api, in particular I try to get timeline from a group. For example lets take a look at request provided on fb developers overview...

https://graph.facebook.com/195466193802264
这将按预期的方式返回一个具有组信息的json

https://graph.facebook.com/195466193802264 this returns a json with group info as expected

https://graph.facebook.com/195466193802264/feed
这应该返回组的时间轴,但是我收到以下错误

https://graph.facebook.com/195466193802264/feed this should return group's timeline, but I get the error below

{
error:{
message:需要访问令牌才能请求此资源。 ,
type:OAuthException,
code:104
}
}

{ "error": { "message": "An access token is required to request this resource.", "type": "OAuthException", "code": 104 } }

所以我创建一个fb应用程序(我怀疑我将在开始时需要这样做)并创建一个访问令牌,但是我找不到任何示例如何发送访问令牌和获取请求,我只发现一个示例如何发送访问使用curl发送请求的令牌。我甚至试图用python伪造一个使用机械化的浏览器,并登录到fb,并确认我同意应用程序的权限...再次,在哪里放置令牌获取数据?

So I created a fb app (I suspected I will need to do this at the begining) and created an access token, but then I could not find any example how to send an access token together with get request, I only found an example how to send access token with a post request using curl. I even tried to fake a browser with python using mechanize and have logged in fb, and confirmed that I agree with apps permisions... again, where to put the token to get data??

我认为这个api是伟大的,但文档几乎是伟大的,在第一个视频中,该人告诉你,使用图形API与正常的http请求相同,应该是,但是请提供一个工作示例如何做...

I think this api is great, but documentation is just almost great, in the first video the guy tells you that using graph api is the same as making regular http requests, which it should be, but then please provide a working example how to do it...

所以有人可以告诉我如何正确使用应用程序密钥和秘密访问令牌,以及如何传递这个令牌与上述要求组的时间表?非常感谢您

So can someone please show me how to properly get access token with app key and secret and how to pass this token with the above request for a group's timeline? thank you very much

推荐答案

对于GET请求,您只需使用查询字符串参数:

For GET requests, you just use a query string parameter:

https://graph.facebook.com/195466193802264/feed?access_token={access token}

就访问令牌而言,根据文档您需要:

As far as the access token, according to the documentation you need:

要阅读一个组,您需要:

To read a Group, you need:


  • 任何有效的access_token(如果该组是公开的)(即该组的
    隐私设置为OPEN)

  • user_groups用户非公开组的权限

  • friend_groups用户的朋友的非公开组的权限

  • 应用和游戏的组必须使用App access_token。

这篇关于Facebook打开图表私人组Feed请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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