从Facebook页面获取事件 [英] getting events from facebook page

查看:133
本文介绍了从Facebook页面获取事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我需要得到一个Facebook页面的事件(如果可能的话,以JSON格式)。我正在使用iOS,我知道如何实现数据,但我只是不知道如何从Facebook获取实际的数据。
我已经尝试过图形API,但它需要访问令牌来做我想要的。我看到一个应用程序,不需要用户进入并允许Facebook应用程序访问从页面获取事件,我想要同样的事情。

So I need to get the events for a facebook page (in JSON format if possible). I'm using iOS and I know how to implement the data after I get it but I just don't know how to get the actual data from facebook. I've tried the graph api but it requires an access token to do what I want. I saw an app that didn't require the user to go in and allow a facebook app access to get the events from a page and I want the same thing.

https://graph.facebook.com/HardasNailsministry / < = this works
https://graph.facebook.com/HardasNailsministry / events < =这不工作(需要访问令牌)

https://graph.facebook.com/HardasNailsministry/ <= this works https://graph.facebook.com/HardasNailsministry/events <= this does not work (requires access token)

所以...有没有办法得到没有访问的事件列表令牌?
或者有没有办法获取访问令牌,而不要求用户允许应用访问?

So... is there a way to get that list of events without the access token? Or is there a way to get that access token without requiring the user to allow an app access?

推荐答案

我得到它了。

您不需要让用户访问他/她的帐户才能获取访问令牌。

You don't need to make the user allow access to his/her account in order to get the access token.

我做的是我去了我的Facebook开发者页面,并创建了一个应用程序。它给了我一个应用程序ID和应用程序的秘密。我使用以下URL来获取access_token:

What I did was I went to my facebook developer page and created an app. It gave me an app ID and app secret. I used that in the following url to get the access_token:

https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=client_credentials

然后我把结果添加到我的图形API请求字符串。

Then I took the result and added it to my graph API request string.

这篇关于从Facebook页面获取事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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