如何在没有任何登录的情况下获取访问令牌? [英] how to get access token without any login?

查看:164
本文介绍了如何在没有任何登录的情况下获取访问令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iPhone应用程序中,我想读取Facebook公共页面上的新闻提要,但我一开始不希望用户登录Facebook来查看页面墙.我尝试传递access_token(在图API的URL中),但是此访问令牌已过期.

In my iPhone app I want to read news feed from public Facebook page but I don't want in the beginning that the user has log in facebook to see wall of page. I try to pass access_token (in url to graph api) but this access token expire.

提前谢谢

哈维尔

推荐答案

您可以为此使用应用程序访问令牌,该令牌可以是以下之一:

You may use your application access token for this which may be one of:

  • YOUR_APP_ID|YOUR_APP_SECRET
  • https://graph.facebook.com/oauth/access_token? client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET& grant_type=client_credentials
  • 收到的应用程序访问令牌
  • YOUR_APP_ID|YOUR_APP_SECRET
  • Application Access Token received from https://graph.facebook.com/oauth/access_token? client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET& grant_type=client_credentials

access_token允许您通过需要access_token

更新:
使用iOS SDK可能看起来像这样:

Update:
Using iOS SDK this may looks like:

[facebook requestWithGraphPath:@"/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
 grant_type=client_credentials" andDelegate:self];

这篇关于如何在没有任何登录的情况下获取访问令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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