我想知道是否可以发布到为在 iOS 中使用 Facebook 而创建的 Facebook 应用程序页面的墙上。我不想使用用户登录来发布到他们自己的墙上,而是想发布到应用程序页面,其中包含开放游戏的更新。这可能吗?
最佳答案
是的,这是可能的。来自 http://developers.facebook.com/docs/reference/api/application/ :
To perform the following operations as an Application Page, and not the current user, you must use the Application's Page access token, not the user access token commonly used for modifying Graph API objects nor the Application access token. This access token can be retrieved by issuing an HTTP GET to /USER_ID/accounts with the manage_pages permission. This will return a list of Pages (including Application profile pages) to which the user has administrative access, along with an access_token for each Page.
…
You can create a link, post or status message by issuing an HTTP POST request to the APP_ID/feed connection. To see more details please see links, posts, and status messages documentation.
To impersonate the Application when posting to the wall (i.e. post as the Application, and not the current user), you must use an Application Page access_token with the manage_pages and publish_stream permissions, as described under Application Access Tokens above.
因此,您首先必须向 API 请求应用程序页面访问 token ,然后使用此访问 token 在墙上发帖。 Facebook iOS SDK 有助于构建上述文档中提到的图形 API 调用。
关于iphone - iOS 发布到 Facebook 应用墙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7495472/