2

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.

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.

  • Sending chat messages has been deprecated and will soon be impossible. According to the Chat API docs:

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.

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

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.

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 ?

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. Send private message to my friend(s) using my android application.

2. Android facebook send a message.

Community
  • 1
  • 1
Yash Sampat
  • 30,051
  • 12
  • 94
  • 120

1 Answers1

2

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.

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

The1Fitz
  • 662
  • 4
  • 8
  • Thank you for your answer. I have marked it correct for now, but I am still not satisfied and will gladly appreciate a better answer. For instance, how is [this app](https://play.google.com/store/apps/details?id=com.zixstudio.birthdayschedulerforfb&hl=en) doing exactly what I have asked for above ? – Yash Sampat May 03 '15 at 16:26
  • 1
    I am unable to see that application in the the Google Play Store but my guess is that the application was still on v1.0 of the Graph API. The migrations to v2.0 of the API are happening over the course of a few weeks. Can you describe exactly what that app is doing which you want yours to do? You describe two scenarios above. – The1Fitz May 11 '15 at 14:04
  • The app posts a birthday message on a user's Facebook friend's wall on their birthday automatically. – Yash Sampat May 17 '15 at 11:50
  • 1
    Ah ok thanks for the clarification! What that app is doing will soon stop. With version 2.x of the Graph API it is 1) Not possible to get all user friends 2) Post onto a users friends wall The direction of v1.0 was not a hard stop but instead it was a migration over the course of a couple of weeks. Once that app gets migrated it will probably stop working. – The1Fitz May 18 '15 at 10:51
  • I see ... thank you for taking the time :) though I wish these features were available ... sigh. – Yash Sampat May 18 '15 at 17:36
  • any news? @The1Fitz ? – gilgil28 Feb 02 '16 at 15:17