授权Facebook应用程序发布到页面墙,但不是用户墙

授权Facebook应用程序发布到页面墙,但不是用户墙

问题描述:

I have a facebook app which can post to the wall of a page by using the administrators 'publish_stream" permission. However I don't want to have the ability to post all over a user's wall, only the pages they control.

Since this is being done automatically I will need a permanent token (offline_access) and obviously the publish_stream permission. But I'm unsure how to request this.

I have seen some applications, like the notes app in pages which have a setting for allow this app to post on wall. This would be easier, but otherwise does anyone know how I can request publish_stream permission for a page via the graph api?

For example, this is the request I use to get the user authorization code before requesting a token. I can't find an equivalent to request authorization for a page though.

https://www.facebook.com/dialog/oauth?
     client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream

我有一个Facebook应用程序,可以使用管理员的“publish_stream”权限发布到页面墙上。但是 我不希望能够在用户的墙上发布,只发布他们控制的页面。 p>

由于这是自动完成的,我需要一个永久令牌(offline_access)和 很明显是publish_stream权限。但是我不确定如何请求这个。 p>

我见过一些应用程序,比如在设置页面中的notes应用程序允许此应用程序 发布在墙上 code>。这会更容易,但是否有人知道如何通过图形api为页面请求publish_stream权限? p>

例如,这是请求 我在请求令牌之前用来获取用户授权代码。我找不到等同于请求页面 em>的授权。 p>

  https  ://www.facebook.com/dialog/oauth?
 client_id = YOUR_APP_ID& redirect_  uri = YOUR_URL& scope = email,read_stream 
  code>  pre> 
  div>

You can't get permission to access only a page's wall / news feed without access to the user's also. If you're worried about "accidentally" posting to the user's wall and not to the page, you can make sure you use the access_token provided in the /me/accounts endpoint for your user.

So, your choices are pretty limited here if you want to use the offline_access permission to post to a pages wall. Limited, as in, you need to have publish_stream and manage_pages permissions.