无法进入令牌facebook应用认证 [英] No access token facebook application authentication

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

问题描述

我想在我的网站上显示我的Facebook墙贴。
所以我不想用一个对话框来认证用户,给他们一些权限,我只是想用他的评论向他显示墙(没有能力添加评论只是只读访问)。



由于我知道现在还没有未过期的令牌,所以有可能仅在每次到期时访问我的数据,而不会请求令牌?



我正在使用asp.net mvc,但我认为这个sultion根本不依赖于平台。

解决方案

你应该:


  1. 将您的Facebook帖子公开

  2. 调用API端点: https://graph.facebook.com/ {your_id} / feed?access_token = {app_access_token}与您的 user_id 和有效的应用程序 access_token

  3. 在您的网站上显示结果。

应用访问令牌不会过期,因此您不会有问题。只要职位是公开的,API就能够接受。理论上,您的帖子应该是公开的,所以匿名用户可以看到这一点。



这也使您能够私下分享内容,而不会在您的网站上显示。


I'd like to show my facebook wall posts on my website. So i don't want to authenticate users with a dialog, to grant them some rights, i just want to show him my wall with comments (no ability to add comment just read only access).

As i know there isn't unexpired tokens now so is it possible to access just my data without requesting token every time it expires?

I'm using asp.net mvc but i think this sultion doesn't depend at platform at all.

解决方案

You should:

  1. Make your Facebook Posts public
  2. Call the API endpoint: https://graph.facebook.com/{your_id}/feed?access_token={app_access_token} with your user_id and valid application access_token
  3. Show the results on your website.

The App Access Token doesn't expire so you won't have a problem. As long as the posts are public, the API will be able to pick them up. In theory, your posts should be public anyway so anonymous users can see this.

This also gives you the ability to share stuff privately and not have it show up on your website.

这篇关于无法进入令牌facebook应用认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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