English 中文(简体)
如果申请得到所有适当的许可,可以进入一个面板网页。
原标题:Can t get access token for a facebook page for an application that has all the right permissions

SO community,

我在试图将申请员额自动到我的Facebook网页上时感到困惑。

这是我采取的步骤:

A. 我批准了我的所有面读书页申请,并准许上网、出版、管理网页。

https://www.facebook.com/dialog/oauth?client_id=<app_id>&redirect_uri=<url>&scope=read_stream,publish_stream,manage_pages,offline_access,publish_actions

B)我要求获得象征性许可才能提出申请

https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=<app_id>&client_secret=<app_secure_key>&scope=manage_pages,offline_access,publish_stream

C. 我现在想让大家看上去,以便能够使用最后员额。

https://graph.facebook.com/feed?<page_access_token>&message=test&id=<page_id>&method=post

然而,在我未能成功的地方,接上了页。

这就是我正在尝试的呼吁。

https://graph.facebook.com/<page_id>?fields=access_token&access_token=<app_access_token>

但是,从这个页上看,我只能回过来:

{
   "id": "<page_id>"
}

任何人都知道我所缺的是什么东西。

纽约总部

问题回答

我们刚刚在过去几天里找到了这项工作。 页: 1 我很抱歉,如果我详细阐述了它超出了必要的范围,但你所做的一些事情似乎是错误的。 总结一下:

如果你正在做<>步骤_A正确,根据URL的看望,这似乎都是正确的,那么,归根结底,你将获得一个CODE(而不是最后的电线)。 这将使用你在A级发出的“URL”转机,从而确保你的服务器接受关于redirectURL的要求。 该表将采用<代码>http://redirectURL?code=A_CODE_GENERATED_BY_SERVER/code>的形式,这样就应当使CODE获得。

页: 1 页: 1 回到服务器。 我看到,你再次确定了“<条码>>范围参数,现在没有必要(在<>步骤_A上填写)。 <>Step_B 请将本函及其附件作为大会文件分发为荷。

https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&client_secret=YOUR_APP_SECRET&code=THE_CODE_FROM_ABOVE

This time Facebook sends back a Response not using the redirectURL though. If you have the correct Step_B request URI you can paste it in your browser location bar and the response will render in your browser itself. You can use an HTTPBuilder (that s what I am using) and capture this Response body. It is of the form access_token=<really_big_string>&expires=<time_to_live>. Parse this response whichever way you prefer.

这也是一个接驳渠道,即(请打电话 access_token_uno),我相信你可以做些什么。 我曾尝试过,因此,我们着手进行Step_C。 我已经知道你的<代码>PageID。 页: 1

https://graph.facebook.com/<PageID>?fields=access_token&access_token=<access_token_uno>

The response will be a JSON block of the form:

{
   "access_token": <required_page_access_token>,
   "id": <PageID>
}

穿戴头巾和你。

The one minor detail to remember: The redirectURL has to remain the same in Step_A and Step_B else the thing fails. Also, I haven t yet tried with the offline_access permission but I don t think the steps above will change even if that is the case.

https://graph.facebook.com 否则,你就应当找到这个网页。

http://developers.facebook.com/docs/authentication/#app-login





相关问题
Facebook Connect login dialog not working

I am using Facebook Connect for iPhone and following the official instructions. I use the following code to display the login dialog: FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:...

Facebook App Profile Tab is Empty ... No Content Displayed?

I can view my application via the http://apps.facebook.com/myapplication/ link and the content shows up correctly. I also added the application as a tab to a facebook page. However, when viewing the ...

Facebook Platform error: "Object cannot be liked"

I m working on a Facebook Application that generates wall posts. In testing these posts, I ve discovered that the Facebook Platform action of "liking" a post is failing. The specific error message ...

how to call showPermissionsDialog() in php (facebook api)?

I was reading over the documentation yet I could not figure out how to call Facebook.showPermissionsDialog() in php include_once ./facebook-platform/php/facebook.php ; $facebook = new Facebook(my ...

Facebook connect

If I plug in the facebook connect into my website, How can I prevent double signups? Lets say I have a user that s already signed up to my site but he clicked the connect with facebook, is there a ...

热门标签