Facebook Message To All Friends - facebook

Is there any way by which I can get all the friends using FB api and than message all of them.
Which approach is better to achieve it, a bot or using facebook api?
If Bot, than which bot can be used as a kickstart, which programming language is preferred?
JAVA,ASP.NET

It is not possible to get all friends - only those who authorized your App. Also, it is not possible to send a message to friends with the API, you can only use the Send Dialog and let the user specify the recipient on his own: https://developers.facebook.com/docs/sharing/reference/send-dialog
What you want to achieve would be possible with a bot though. Users can register to get messages from the bot, so you can create an alert system with it. More information: https://developers.facebook.com/docs/messenger-platform/
It would be a general alert system though, not between friends. For that, i would recommend not using Facebook but Emails.

Related

Facebook Oauth-enticated users, chat between themselves on website

I have a website where users log in with Facebook. Right now there's no way for users to contact each other.
I was thinking of building a dedicated live messenger with sockets, but I wonder if there's an easier way to allow them to send messages to each other's Facebook Messanger, since they are already logged in with facebook.
There is no API for a chat between two users. Everything in Messenger API is focused on communication between a user and a page.
At most you can use the Send dialog to let a user send a link to their friends, but that requires the user actively using the button, you can not “automate” that; and handling the result will have nothing to do with your site any more, everything after that will happen in messenger only. https://developers.facebook.com/docs/sharing/reference/send-dialog

Graph API Facebook : user id

I am working on a business application which is using facebook and I need to send a private message to a connected user friend.
For getting all the user friends, I am using me/taggable_friends. In this way I have all the user friends but I can't retrieve the real friend user id. I need to know this field for sending a private message (or request or notification).
Regarding the FB documentation, this feature is only available for the "games" product but it's look like strange.
Maybe i'm doing something wrong but I don't understand how should I proceed.
Thank's for your answers.
taggable_friends can (and should) only be used for tagging friends, you don´t even get an ID with it, only a tagging token (see Facebook docs).
For sending private messages, the best (and only) way is to use the Send Dialog of the JavaScript SDK: https://developers.facebook.com/docs/sharing/reference/send-dialog
The user has to input the target friend and the message on his own, which is a requirement for the message anyway. It always has to be 100% user generated.
The Chat API is deprecated and should not be used anymore: https://developers.facebook.com/docs/chat
On iOS, if you want to send a private message to another Facebook user, you should use the Message Dialog: https://developers.facebook.com/docs/ios/share#message-dialog
This lets a user share a message with any of their FB friends, then return to your app. You can ensure the message contains a link which the recipients will be able to click on.

Is it possible to talk with the users of my Facebook app through Facebook chat?

If I create a browser based Facebook app is it possible to talk, using Facebook chat, with the users that use my app? Is there any kind of users list that used the app like the normal friends list?
No, you are unable to do this. The only way would be to friend the users and then use the chat. Technically your app is not sentient and therefore unable to "chat". An alternative for you might be to request the users email address from permissions and then contact them using this.

Send Message to Friend On Facebook with C#

I am new on Facebook API. I want to send message to friend with facebook api. I am developing a desktop application in c#. And I used graph.facebook.com but I can see just some information. I think that to login facebook system and after send message some id. I looked developers.facebook.com but I didnt find useful information. Maybe I looked in wrong way..
I need some advice about it (how to login and send message)
I followed function of messange sendin on google chrome and I saw send.php worked . But I want to use Facebook API
By design Facebook does not allow the API to send messages. You can post on the other users wall, or send them an email.

How can i send app request to both FB friends and application users?

I've a situation in my application where I need to send apprequests (or any way of sending any request to my users) for both my facebook friends as well as the same application users.
The problem with this is ,
when we are sending apprequests using application itself(using app_access_token) we can't send app requests to my facebook friends who are not yet part of my application ("oAuthException : User must accept TOS" will be thrown).
So when i use the 'Request dialog' (FB.UI app request method) its possible to list/send requests to only FB friends .
So i need a solution for having a method where i can list all my user's FB friends and application users and send apprequest at once to all..
Anybody has tried something like this before?
And also i tried FB.UI (send method) and searched for graph API and also considered option of posting wall message and everything doesn't work both types..
Any help on this?
May I draw your attention to the following Facebook Documentation for AppRequests:
http://developers.facebook.com/docs/reference/dialogs/requests/
You need to have a look at the section headered "Frictionless requests".
From what I understand from this sentence:
Upon first sending a request to a friend from within an app, a user may authorize the app to send subsequent requests to the same friend without prompting for his permission.
It sounds like there is no way to "bulk" send to all of a user's friends, it is on a friend-by-friend basis. It sounds sensible to me, I wouldn't want my all of my Facebook friends to be flooded with invitations either.
You could however opt for prompting the user with the Friend Request interface which is much friendlier to your users... this is available using the Javascript SDK.