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

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

问题描述

我有一个Facebook页面,我想从中获得一些东西。第一件事是饲料,从我读到的是公开的(不需要access_token)。但是我也想得到这些事件,他们不是公开的,需要access_token。



我不想让用户登录Facebook或任何东西像那样。我只想从这个唯一的页面推送所有的数据。这就是为什么我已经抛弃了我在这里找到的许多例子,而在 https://developers.facebook.com/blog/post / 500 / ,因为他们希望用户登录或需要一些用户操作我没有被压缩。



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



我尝试点击这里: 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作为回报...



有人可以帮助我吗?



非常感谢,谢谢:)

解决方案


  1. 转到 Graph API Explorer

  2. 从下拉菜单中选择您的应用程序

  3. 单击获取访问令牌

  4. 选择 manage_pages 权限(您可能需要 user_events 权限,不确定)

  5. 现在访问我/帐户连接并复制您的页面的 access_token

  6. 点击您的页面ID

  7. 添加页面的 access_token 到GET字段

  8. 调用所需的连接(例如: PAGE_ID / events


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.

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.

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.

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...

Could someone please help me?

Greatly appreciated, thank you :)

解决方案

  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的Facebook访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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