页面的 Facebook 访问令牌 [英] Facebook Access Token for Pages

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

问题描述

我有一个 Facebook 主页,我想从中获取一些信息.首先是提要,从我读到的内容来看,它们是公开的(不需要 access_token).但我也想获得这些事件……而且它们不是公开的,需要 access_token.

I have a Facebook Page that I want to get some things from it. First thing are feeds and from what I read they are public (no need for access_token). But I want to also get the events... and they aren't public and need the access_token.

我不希望用户登录 Facebook 或类似的东西.我只想从这个唯一的页面推送所有数据.这就是为什么我已经放弃了在这里找到的许多示例以及 https://developers.facebook 上的示例.com/blog/post/500/ ,因为他们希望用户登录或需要一些我不感兴趣的用户操作.

I don't want the user to login in Facebook or anything like that. I just want to push all the data I can from this only page. That's why I already discarded many examples I found here and the one at https://developers.facebook.com/blog/post/500/ , because they want the user to login or require some user action I'm not interessed.

我想要的是我的 Facebook 应用程序拥有完全授权和 access_token 以从我拥有的这个 Facebook 页面推送数据(管理员).这可能吗?我已经尝试了很多东西,但似乎没有任何效果.

What I want is that my Facebook Application have full authorization and access_token to push the data from this one Facebook Page that I own (admin). Is this possible? I already tried many things but nothing seems to work.

我试着点击这个:https://www.facebook.com/dialog/oauth?client_id=150635421702954&redirect_uri=http://MY_URL/&scope=manage_pages&response_type=token&fields=access_token - 将 MY_URL 更改为我的网站,并请求授权以编辑我拥有的每个页面.即使不是我想要的我点击但没有 access_token 作为回报...

I tried clicking at this: https://www.facebook.com/dialog/oauth?client_id=150635421702954&redirect_uri=http://MY_URL/&scope=manage_pages&response_type=token&fields=access_token - changing MY_URL to my site's and it requests authorization to edit every page I own. Even not being what I want I clicked but had no access_token in return...

推荐答案

  1. 转到Graph API Explorer
  2. 从下拉菜单中选择您的应用
  3. 点击获取访问令牌"
  4. 选择 manage_pages 权限(您可能也需要 user_events 权限,不确定)
  5. 现在访问 me/accounts 连接并复制您页面的access_token
  6. 点击您页面的 ID
  7. 将页面的 access_token 添加到 GET 字段
  8. 呼叫您想要的连接(例如:PAGE_ID/events)
  1. Go to the Graph API Explorer
  2. Choose your app from the dropdown menu
  3. Click "Get Access Token"
  4. Choose the manage_pages permission (you may need the user_events permission too, not sure)
  5. Now access the me/accounts connection and copy your page's access_token
  6. Click on your page's id
  7. Add the page's access_token to the GET fields
  8. Call the connection you want (e.g.: PAGE_ID/events)

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

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