获取其他用户发送的可供用户使用的应用请求
BUMP:这不是一个死请求。我仍然希望从 Facebook 或其他任何人那里得到可靠的答案。谢谢。
修改后的询问:我不知道我是否没有提出正确的问题,或者我是否提出了一个无人能回答的有效问题。
新问题:
我们可以使用 FQL 或其他方法来获取 reqs.php 中看到的所有请求吗?我本质上是在寻找这样的东西:
SELECT request_id, app_id FROM apprequest WHERE recipient_uid = me()
通知返回该数据,但应用程序请求通常被批量处理到单个记录中,并带有标识一些但不是所有请求的链接。我想要当前打开的所有应用程序请求的单独记录。用于执行此操作的数据必须可用,因为这是用于构建通知的数据!看来这并没有提供给我们。 :(
谢谢!
原始查询如下:
我有一个应用程序,可以聚合用户的 Facebook 信息的各种来源。我正在处理的一组数据是已发送的应用程序请求的集合例如,我打开 GreatApp 并单击向您发送请求,您可能会也可能不会使用 GreatApp,但我们假设您没有阻止来自它的请求。您以及返回 GreatApp 的链接您看到的数据与 reqs.php 但格式不同,数据更多,当然更好;)
我认为这就是我们在 apprequests 中得到的。来自这个问题 据我了解,apprequests 是当前应用程序发出的请求的集合。
当使用path/me/apprequests时,我们不需要指定app ID。但我相信这里我们确实需要提供应用程序令牌而不是用户令牌。这是正确的吗?如果这是正确的,那么这将确认请求是该应用程序发出的请求,而不是其他应用程序生成的请求。
使用 FQL 时,我们需要识别应用程序的 uid 以及请求的 id,以便查询 apprequests 表。我明白了,但即使有有效的请求 ID 和应用程序 ID(以及有效的权限),FQL 也不会返回请求数据。 (我还没有检查应用程序 ID,也许这就是关键。)
我希望人们能为上述任何一个提供一些具体的示例,特别是从其他应用程序获取入站请求,并确认预期的令牌或其他详细信息用于 /apprequests 和 apprequests 表返回数据。
谢谢!
BUMP: This is not a dead request. I'm still hoping to get a solid answer from someone at Facebook or anyone else. Thanks.
Revised Inquiry: I don't know if I'm not asking the right question, or if I'm asking a valid question that no one can answer.
New Questions:
Can we use FQL or another means to get all of the requests seen at reqs.php? I'm essentially looking for something like this:
SELECT request_id, app_id FROM apprequest WHERE recipient_uid = me()
Notifications return that data but app requests are often batched into a single record with a link identifying some but not all requests. I want individual records for all app requests currently open. The data to do this must be available, as this is the data used to build notifications! It just seems that this is not being made available to us. :(
Thanks!
Original Inquiry Follows:
I have an app that aggregates various sources of Facebook information for a user. One of the sets of data I'm working on is the collection of apprequests which have been sent to this user by friends. For example, I open GreatApp and click to send a request to you. You may or may not use GreatApp but let's assume you haven't blocked requests from it. You now open my AggregatorApp that shows my request to you, and the included link back to GreatApp. The data you see is the same as at reqs.php but formatted differently, with much more data, and of course simply much better. ;)
I thought that is what we got in apprequests. From this question I'm understanding that apprequests is a collection of requests sent out by the current application.
When using path/me/apprequests, we don't need to specify an app ID. But I believe here we do need to provide an app token rather than a user token. Is that correct? If that's correct then this confirms that the requests are those that this app sent out, not requests generated by other apps.
When using FQL, we need to identify the uid of the app as well as the id of the request in order to query the apprequests table. I get that, but even with a valid request id and app id (and valid permissions) FQL doesn't return request data. (I haven't checked with an app id, maybe that's the key.)
I am hoping people will provide some concrete examples for any of the above, specifically getting inbound requests from other apps, and confirmation about what token or other detail is expected for /apprequests and the apprequests table to return data.
Thanks!
Other threads asking the same question without a good (or any) response:
thread1 thread2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要发出图形 api 请求来获取用户的 apprequests 连接。请参阅此处的当前文档: http://developers.facebook.com/docs/reference/ api/用户/。
在“连接”表中,文档正确地指出您需要应用程序访问令牌来检索对该用户的请求。 (http://developers.facebook.com/docs/reference/api/user/#apprequests) 下的文档中有一个错误,声称您需要用户访问令牌。这是不正确的,并且(如您所见)将返回空的请求列表。
应用程序发送的请求仅对该应用程序可见。用户无法查看或删除这些请求(尽管他们可以隐藏请求)。原因是应用程序可以将数据放入请求中(255 个字符),而这些数据永远不会暴露给用户或其他应用程序。
我认为没有办法可以聚合来自您没有访问令牌的应用程序的用户请求。
You need to make a graph api request to get the apprequests connection for a user. See the current documentation here: http://developers.facebook.com/docs/reference/api/user/.
In the Connections table, the documentation correctly notes that you need an application access token to retrive the requests to that user. There's a bug in the documentation under (http://developers.facebook.com/docs/reference/api/user/#apprequests) that claims you need a user access token. This is incorrect, and (as you've seen) will return an empty list of requests.
Requests sent by an application are only visible to the application. The user can't see or delete these requests (though they are able to hide the request). The reason for this is that the applications can put data into the requests (255 characters) that's never exposed to the user or other applications.
I don't think there's a way you'll be able to aggregate a user's requests from apps that you don't have an access token for.
我发现(在我的问题被删除之前)是,您无法使用用户令牌访问请求,并且应用程序令牌只能访问应用程序已发送的请求(我自己在文档中发现了这一点并使用图形浏览器)。因为我知道有 iPhone 应用程序和浏览器插件用于处理请求,所以我假设它们正在访问页面本身并解析数据(例如抓取网站)。这种方法的缺点是,请求页面上一次仅显示来自每个应用程序的大约 100 个请求。
(除非有些人找到了他们不分享的方法......)
What I have found out (before my question was deleted) was that you can't access requests with a user token, and app tokens can only access requests that app has sent (and I found that out myself in the documentation and playing with the graph explorer). Since I know there are iPhone apps and browser plugins for processing requests, I assume they are accessing the page itself and parsing the data (like scraping a site). The downfall to that approach is that on the request page only around 100 requests from each app are shown at one time.
(Unless some people have found a way that they aren't sharing...)
你是对的,你需要 app_access_token 而不是 user_access_token。
我认为 FB 文档有错误。
You are right, you need the app_access_token and not the user_access_token.
I think the FB documentation has an error.
一位 Facebook 开发者在此处针对我的错误报告提供了明确的答案。解决方案是这是设计使然。这与 @noah-callaway 的注释有关,即请求中可能存在一些特定于应用程序的数据,这些数据不应可供其他应用程序使用。
在我看来,这是一种耻辱,因为 Facebook 致力于在朋友之间共享数据,我认为当应用程序可以在彼此之间共享(有限且合理的)信息时,它为生态系统增加了一个维度。
感谢您的回复!
The definitive answer was provided by a Facebook developer here in response to my bug report. The resolution is that this is By Design. This relates to the note by @noah-callaway that there's probably some app-specific data in requests that should not be available to other apps.
This is a shame, in my opinion, because as Facebook is all about sharing data among friends, I think it adds a dimension to the ecosystem when apps can share (limited and reasonable) information among one another.
Thanks for the responses!