iOS发布到Facebook应用程序墙 [英] iOS post to the Facebook app wall

查看:92
本文介绍了iOS发布到Facebook应用程序墙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以发布到在iOS中使用Facebook创建的Facebook应用页面的墙壁。而不是使用用户登录来发布到自己的墙上,我想在应用程序的页面上发布有关开放游戏的更新。这是可能的吗?

I am wondering if it is possible to post to the wall of the Facebook app page created for using Facebook in iOS. Rather than use the user login to post to their own wall, I would like to post to the app's page with updates on open games. Is this possible to do?

推荐答案

是的,这是可能的。从 http://developers.facebook.com/docs/reference/api/application/

Yes, it's possible. From http://developers.facebook.com/docs/reference/api/application/:


要执行以下操作作为应用程序页面而不是当前用户,必须使用应用程序的页面访问令牌而不是常用于修改Graph API对象的用户访问令牌以及应用程序访问令牌。可以通过使用manage_pages权限向/ USER_ID / accounts发出HTTP GET来检索该访问令牌。这将返回用户具有管理访问权限的页面列表(包括应用程序配置文件页面)以及每个页面的access_token。

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.

...

您可以通过向APP_ID / feed连接发出HTTP POST请求来创建链接,发布或状态消息。要查看更多详细信息,请参阅链接,帖子和状态消息文档。

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.

在发布到墙上时冒用该应用程序(即作为应用程序发布,而不是当前的用户),您必须使用具有manage_pages和publish_stream权限的应用程序页面access_token,如上述应用程序访问令牌所述。

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提供一个Application Page访问令牌,然后使用这个访问令牌在墙上发布。 Facebook iOS SDK有助于构建上述文档中提到的Graph API调用。

So you first have to ask the API for an Application Page access token and then use this access token to post on the wall. The Facebook iOS SDK helps to construct the Graph API calls mentioned in the documentation cited above.

这篇关于iOS发布到Facebook应用程序墙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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