Facebook:离线时在页面(或其他用户)的墙上书写

发布于 2024-12-21 17:01:45 字数 396 浏览 3 评论 0原文

我知道在 API 调用中使用 /USER_ID/feed ,您可以写入该用户 ID 的留言墙。 我的应用程序设法从数据库获取该 ID,并且鉴于该用户已经接受该应用程序,它会在用户离线时正常写入该用户的墙上。

但请理解:如果您尝试在离线状态下执行此操作,它将作为 USER_ID 发布。

发生的情况是:当您登录时,如果您尝试使用 /ID/feed,并且 ID 不是您自己,它会尝试在该用户的墙上发布。

但是,如果您尚未登录,它将尝试发布 AS 该用户 ID,并且由于该用户不会接受您的应用程序,因此它将失败(或者如果该用户接受了您的应用程序,则它会失败)会像他本人一样发帖)。

我想知道是否没有“to”或“target_id”字段我们可以填写?

我不知道如何在离线状态下让用户发布到另一个用户的墙上。

I'm aware that using /USER_ID/feed on a API call, you can write to this user ID's wall.
My app manages to get that ID from a database and, given this user has already accepted the app, it writes on this user's wall normally, while they're offline.

But understand: if you try to do that while offline, it'll post as the USER_ID.

What happens is: while you're logged in, if yout try to use /ID/feed, and the ID isn't yourself, it'll try to post on that user's wall.

If you, however, aren't logged in, it'll try to post AS that user ID, and, since the user won't have your app accepted, it'll fail (or if that user has your app accepted, it'll post as if it were him).

I wonder if there is no "to" or "target_id" field we can fill in?

I have no idea how to, while offline, make a user post to another user's wall.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

策马西风 2024-12-28 17:01:45

好的,所以我做错的是:我没有使用原始用户的访问令牌。由于 Facebook 就是通过这种方式识别发帖者的,所以现在它可以正常工作了。

Ok, so what I was doing wrong was: I wasn't using the original user's access token. Since this is how Facebook identifies who is posting, now it works properly.

走野 2024-12-28 17:01:45

如果用户A不是朋友,则无法在用户B的留言墙上发帖。

现在,如果他们是朋友(都使用 publish_stream 权限授权您的应用)并且用户 A 已登录,并且在 POST 到时会使用他的 access_token /B/feed 它将作为 A 发布。否则,它将作为 B 发布。

User A can't post on user B's wall if they are not friends.

Now if they are friends (both authorized your app with publish_stream permission) and user A is logged in, and his access_token is used when POSTing to /B/feed it will post as A. Otherwise it'll POST as B.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文