Get list of friends above the messenger in Facebook with Graph Api - facebook

I stuck on finding a way to get the list of friends above the messenger :
This list contains the "most used friends" in facebook messenger...
Facebook give us a way to get these information ?
Thank you

Facebook chat does not use standard Graph Api, it uses XMPP protocol instead. Here you can find facebook documentation. As far as I know you can get list of active friends in XMPP, you can get more info about xmpp roster here. The best way to implement this is to use some open source XMPP libraries. There is official list so use one of those.
You should also note that "Your Facebook Chat integration should only be used for sessions that are expected to be long-lived. Clients should not rapidly churn on and off." The chat API is meant to be used for chat. With that in mind consider if you are really going to use that api for a long term session.

There is currently no API which returns the list of friends visible at the top of the chat window on Facebook.com

Related

Can i send direct messages to my clients facebook followers using API?

I have seen services advertising that they can message the followers of pages and accounts on Facebook. I have gone over lots of different Facebook API's and several interesting threads on here but cant find a definitive answer.
Is is possible to directly message via a bot users who like a page providing obviously we have a valid admin token for that page?
Is is possible to directly message via a bot users who like a page
No, that is not possible.
All communication via the Messenger platform API (basis for “bots” in Facebook terminology) requires that the user initiates it.
And it would probably be considered spam by most people - just because I liked your page, does not mean I want to be contacted by you in any way beyond that. Posting to your page is the designated way of communicating with the people that follow your page.

Facebook Message To All Friends

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.

Facebook API - Friend List

I searched the internet the whole day for this, and came to the conclusion that there is no way to get a user's full friend list since API 2.0 (correct me if I am wrong).
What I want to do is, given the app user and another facebook user, generate a report about their "second level" mutual friends. That is - (friends of mine) who are friends with (a friend of his). Illustration:
Is this kind of thing possible after facebook's restriction since API 2.0 in any platform (Different SDKs, Facebook's Graph API, etc)?
Many Thanks.
This would be the API: https://developers.facebook.com/docs/graph-api/reference/user-context/all_mutual_friends
There is no way to get friends (or users in general) who did not authorize your App. Every list you get will only include users who authorized your App.

Facebook API for conversations

Me and my friends are frequently using a Facebook group chat conversation. I'm building a web app that allows them to login with Facebook and do some silly stuff. Is there any way I can add that specific Facebook conversation so they can chat while on the website just like they would on facebook? I checked the API but didn't really find any references to this
Has anyone done stuff like this?
The Chat API is deprecated, it is impossible to do that.
https://developers.facebook.com/docs/chat

How to add facebook friends searchbar in website

I am learning facebook php and javascript sdk. I am trying to create a facebook search friend bar in my app where user types friends name and as user types, the searchbar should display most appropriate result while user is typing. Similar to what facebook search bar does. Is there a social plugin or any other tool available to acieve this task? To achieve this, I tried facebook comments plugin with user_friends permission. When user writes any friends name followed by # sign on comments field, facebook gives most appropriate result. But I dont know how to get what user wrote on comments. Any pointers will be helpful.
FB introduced API versoining. If you are going to create new app it will use version v2 and you will not get full friends list from me/friends.
/me/friends returns the user's friends who are also using your app
In v2.0, the friends API endpoint returns the list of a person's friends who are also using your app. In v1.0, the response included all of a person's friends.There are two key use cases where apps need access to non-app friends: tagging and inviting. In v2.0, we've added the Taggable Friends API and the Invitable Friends API to support these flows.After a person has logged in with v2.0 of Facebook Login, calling /v1.0/me/friends and/v2.0/me/friends` will both result in the v2.0 behaviour - both calls will return the set of the person's friends who also use the app.
Read this documentation
https://developers.facebook.com/docs/apps/upgrading
Either you can create this by yourself (not too much of complex). You have access to the friendlist, so you can get all the friends with /me/friends. You can store them (their name/info) into a variable in your application and implement search. This will make your facebook api concepts better.
Or there are many friend selectors plugin/codes that you can integrate in your application. But you'll have to modify them accordingly since you dont want to show a pre-populated list of friends instead you want to implement search.
I've used mbrevoort's multi-friend selector in my applications.
But if you just want to implement search, implementing on your own would be really easy and less complicated!