通过 Android 应用向 Facebook 好友发送消息 [英] Send a message to a Facebook friend from an Android app

查看:58
本文介绍了通过 Android 应用向 Facebook 好友发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用,我在其中实现了 Facebook 登录.我可以使用 Graph API 检索登录用户的 Facebook 好友.

I have an app in which I have implemented Facebook login. I am able to retrieve the logged-in user's Facebook friends using the Graph API.

中心问题是我需要能够与登录用户的朋友进行交流.这种交流可以通过任何可能的方式进行:墙贴、收件箱消息或聊天消息.

The central problem is that I need to be able to communicate with the logged-in user's friends. This communication can occur in any possible way: wall post, inbox message or chat message.

我们将取消通过图 API.具体来说,针对 [user_id]/feed 的帖子,其中 [user_id]与会话用户或 stream.publish 调用不同target_id 用户与会话用户不同,会失败.

We will remove the ability to post to a user's friends' walls via the Graph API. Specifically, posts against [user_id]/feed where [user_id] is different from the session user, or stream.publish calls where the target_id user is different from the session user, will fail.

  • 发送聊天消息已被弃用,很快将无法发送.根据 Chat API 文档:
  • 2014 年 4 月 30 日,我们宣布弃用 XMPP Chat API作为 Platform API v2.0 版本的一部分.服务和 API 这个2015 年 4 月 30 日之后将不再提供文档封面.

    On April 30, 2014, we announced the deprecation of the XMPP Chat API as part of the release of Platform API v2.0. The service and API this document covers will no longer be available after April 30, 2015.

    1.0 版于 2015 年 4 月 30 日弃用后,chat.facebook.com并且 xmpp_login 权限将不再可用.

    Once version 1.0 is deprecated on April 30, 2015, chat.facebook.com and the xmpp_login permission will no longer be available.

    我们推荐已集成 XMPP Chat API 的开发者在 2015 年 4 月 30 日之前从他们的应用程序中弃用此功能以避免糟糕的体验.

    We recommend developers who have integrated with the XMPP Chat API deprecate this functionality from their apps before April 30, 2015 to avoid broken experiences.

    基本上,我需要向已登录用户的 Facebook 好友发送消息,无需用户交互(这并不意味着我会向用户的好友发送垃圾邮件,只是该消息将被安排预先使用在 AlarmManager 中注册的 PendingIntent).这可能吗?

    Basically, I need to send a message to a logged-in user's Facebook friends, without requiring user interaction (This does not mean I will be spamming a user's friends, just that messages will be scheduled in advance using a PendingIntent registered with the AlarmManager). Is this at all possible ?

    对于这篇文章的长度,我深表歉意,如果你还在我身边,我感谢你的耐心等待.我不是那种想被勺子喂食的人,但我对这个问题已经无计可施,Facebook 文档没有给我一个明确的答案.我需要一个果断的答案或一个可用的解决方法来解决这个问题.

    I apologize for the length of this post, and if you're still with me, I thank you for your patience. I'm not the kind of person that wants to be spoon-fed, but I've reached my wit's end with this problem and the Facebook documentation is not giving me a clear answer. I need a decisive answer or a usable workaround to this problem.

    我已经提到了这些问题,但没有成功:

    I have already referred to the these questions without success:

    1. 使用我的 android 应用程序向我的朋友发送私人消息.

    2. Android facebook 发送消息.

    推荐答案

    从 4 月 30 日起,您将无法再获取所有用户好友,因为 Graph API 1.0 版将被弃用,而 v2.0将成为 API 的当前版本.可以在此处找到有关版本控制的更多信息.

    First off from the 30th of April you will no longer be able to fetch all a users friends as version 1.0 of the Graph API will be deprecated and v2.0 will become the current version of the API. More on versioning can be found here.

    至于您在 Android 上发送消息的实际问题,目前无法通过 Android SDK 实现

    As for you actual question about sending messages on Android this is not currently possible via the Android SDK

    这篇关于通过 Android 应用向 Facebook 好友发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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