Facebook. Is it possible to send private messages? - php

I know that it may be stupid to post this question again because there are a lot of simmilar questions. But they are all dated 2010-2012 years and the info may be updated. Especially with new version of the facebook API V2.0 from April 30th, 2014.
I've made some digging on the possible options and found Chat API and interesting post related to it: http://nishgtm.com/2013/11/facebook-message-api-php/
But I couldn't make it work.
Also there some info on new Message Dialog thing on the FB docs but there are only iOS and Android examples.
I'm building a web application and a mobile application. And I wonder, is it possible to send private messages on the behalf of the fb application, not fb user.

It's not possible to send messages on behalf of the application.
To let people that use your app send to their friends, use:
iOS: https://developers.facebook.com/docs/ios/message-dialog/
Android: https://developers.facebook.com/docs/android/message-dialog/
desktop web: https://developers.facebook.com/docs/sharing/reference/send-dialog
mobile web: unfortunately, this isn't supported yet

It's 2017 and I found something interesting. We can send private messages on mobile now, but it's buried. Facebook decided to allow sending private messages to the Share Dialog where the user has to click the dropdown and select "Share in a private message". This works on all platforms and I attached a screenshot below. I hope this helps someone in the future until Facebook decides to change things again.

Read about
https://developers.facebook.com/docs/games/notifications
this may be what you need

Related

App request/Invite through Facebook API using PHP

I'm building an app and the client wants the following logic:
User logs in to the app.
User selects a Friend.
User selects a gift that the User will send to his Friend.
User writes a message to his Friend.
Friend receives a SECRET notification about the gift.
With "SECRET" I mean that Friend will not be able to see WHO is the User that sent the gift.
So the concrete question is how to send a notification to the FRIEND without a clue about the USER that sent it? I think is not possible but I want to be sure and check with the experts.
And if it's not possible, what do you recommend to accomplish something like this? Should I use the app request dialog and hope that the Friend will see it? Is there any other FB API tool I can use?
I really appreciate your help.
What you're trying to achieve is not possible with FB's API. As explained already by #CBroe.
You can send a request notification if the user uses your app. However, You can do one thing but that won't be completely anonymous.
You can send the friend a notification from the user and make it just an invite to try the application and after the friend uses your app (authenticates), your app can then send a notification and say someone left a SECRET message for them. This could be after few hours or instant, Whatever you/your client prefers. However as i said, this won't be completely anonymous nor it's hard to guess who left the message unless the friend isn't smart enough to know who that could be.
With the beta Notification API something similar would be possible, but only if the receiver has authenticated your app: https://developers.facebook.com/docs/games/notifications/#impl

iPhone and FB: Can we get FB friend's list with email addresses?

I am co-developing an app with an ios programmer. In our app there is a feature of Share Topic, in which we would like to show the list of Facebook friend (which is already done) but as per my ios programmer its not possible to get the Facebook friends list.
Any ideas? If it is not then is it possible to get it from PHP (web-services) end?
---EDIT BEGIN----
And maybe if not possible to get email addresses, then can we send private messages to those friends? Is this would be possible?
---EDIT END----
Any helpful thoughts would be appreciated. Thanks!
Your iOS Developer is wrong.
FriendLists can be accessed via the FriendList object endpoint (docs). Note that this functionality requires the read_friendlists permission.
As a side note: anything that can be acheived via the GraphAPI can be done with the iOS SDK.
Example:
[facebook requestWithGraphPath:#"me/friendlists" andDelegate:self];

Viewing Posts On My Companies Page and Commenting On Them Or Messaging The OP

I am working on an integration script which will allow our company to view all posts on the companies facebook wall from within our CRM system and then allow support staff to comment on questions asked or in the case where something can't be discussed on the public wall have the option to send that user a private message through Facebook to request details.
Is this something which is possible with the current API and if so where would I look. I have been looking through the PHP SDK on the Facebook developer site and have been Facebook::api object but am having difficulty finding information on which methods I need to call to do what I am trying to do and how I gather the information I am after.
Cheers
The PHP SDK just provides you with methods to access the Graph API. To find out, what the Graph API is all about, please read its documentation.

Send a Message or Notification to the friend in facebook

I need to send a message or a notification about an event or something else to my friend from my facebook application for website. The rest api is no longer in use ....So is there any other ways...Sample codes???
Thanks in advance....
You can't as yet send notifications via the new API.
While we currently don't allow
applications to send messages through
this API, we're always thinking about
new functionality to offer through
Facebook Platform.
Source: http://developers.facebook.com/blog/post/291
"Sample codes" and documentation, straight from the horse's mouth: http://developers.facebook.com/docs/api
See especially the sections labelled "Reading" and "Publishing"

Service to connect instant messaging (msn/icq gtalk etc) with your websites visitors?

Basically, I want my users to be able to just click a button and get a small popup-window that puts them in contact with me through one of the major communicationstools.
Does anyone know about any such services?
You'd need to cover a lot of different services, and hope they were running that app when they visited your site.
Use Live Chat or similar - you've probably seen the type of thing around:
http://www.imsupporting.com/
http://www.livezilla.net/home/en/ - free
http://www.chat4support.com/ - free version
http://www.craftysyntax.com/ - free (plus pointless following eyes on homepage).
I've not tested them so can't give any info on how good they are...hope this helps.
Make a link with the following href format:
SendMessage
Note: requires the client have the IM client installed, and is not supported by all IM clients.
For AOL:
Send Message
For Yahoo:
Send Message
For Google:
Send Message
For MSN/Windows Live:
Send Message
For ICQ:
Send Message

Categories