-1

I have my friend's Facebook id and now want to send him a message through my flex based application. How to do it?

Update: I logged-in to my facebook profile and want to send message to my all friends by using flex based application.

Note: I have fetched facebook profile id of all friends.

Mysophobe
  • 622
  • 2
  • 10
  • 33
NKM
  • 304
  • 2
  • 7
  • 13

2 Answers2

2

Facebook recently published the Notifications API, see also https://developers.facebook.com/blog/post/2012/08/31/reach-users-1-1-with-the-notifications-api/. Those can be send to any user, that is using your app already.

Otherwise, a user-to-user request (considered an “invite”, if the recipient is not user of your app yet) would be the alternative.

CBroe
  • 91,630
  • 14
  • 92
  • 150
1

Do a FQL query to find the user's username using the Facebook ID (123).

SELECT username FROM user WHERE uid = 123

FQL user: http://developers.facebook.com/docs/reference/fql/user/

Once you have obtained the username of the user, you can send an email to username@facebook.com and the recipient will receive it as a Facebook message.

Example: Allowing users of facebook application to communicate somehow

(The example is using PHP but the idea is the same)

Community
  • 1
  • 1
Mysophobe
  • 622
  • 2
  • 10
  • 33
  • That could be a violation of Facebook Platform Policies (https://developers.facebook.com/policy/), IV. Application Integration Points, 5.: _“Facebook messaging (i.e., email sent to an @facebook.com address) is designed for communication between users, and not a channel for applications to communicate directly with users.”_ – CBroe Sep 12 '12 at 09:48