Getting list of messages & pokes in API - facebook

I've tried using both the old REST API, as well as the Graph API. I can not seem to figure out a way to get a list of ALL messages and pokes (and when I say messages, I mean private messages). These items do not appear in the stream (from what I can tell), so getting them there is not possible. Notification.get() in the REST API only gets unread messages. Any suggestions?

Read the basic Graph-mining tutorial at http://ericosgood.com/prog/facebook-android-sdk-tutorial/#comment-216.
To get information about the user, you need to branch /me, for events branch /me/events, for messages you need to branch me/inbox.
Have a look at: https://developers.facebook.com/docs/reference/api/message/
For pokes use me/pokes.
For both pokes + inbox you'll need the additional permission: read_mailbox.

Related

Can't get Google Chat messages with Gmail API

What are the details of your problem?
Until recently, in my own web application, I used the Gmail API to retrieve Google Chat messages as follows.
I was able to get it from "Label: CHAT" by executing as follows.
(1) Acquisition of thread ID belonging to CHAT label
https://gmail.googleapis.com/gmail/v1/users/me/messages?labelIds=CHAT
(2) Get message information from thread ID
https://gmail.googleapis.com/gmail/v1/users/me/threads/[Thread ID]
However, it seems that it has been impossible to obtain it since around December 2022, and when I searched for "in: chats" in Gmail, the messages after December 10th were not displayed.
Any method is fine, so I would like to be able to get Google Chat messages as before.
Anyone know the cause and solution?
Please check.
I also tried using the Google Chat API to see if it was possible to get messages, but I could only get messages in the space, and I couldn't get direct messages, so I wasn't able to use it.
I checked all the messages in the labels that can be obtained at "https://gmail.googleapis.com/gmail/v1/users/me/labels", but it seems that chat messages are not included.
Also, in another answer, there was a description that the state included in the Gmail API was a bug, so it is possible that this bug was adapted and it was not displayed, but in that case, there is another way to deal with it. Are you there?
Access CHATS label with Gmail API

Sending data messages without REST Api in Firebase

I was planning to send data messages (I do not mean notification messages!) to specific users via FCM. I tried the REST Api named ARC but since it is still in beta use it seems like there are still some issues that need to be fixed. I get "401 Unauthorized" all the time so I was looking for another way to get these messages to the users. How exactly am I supposed to send the requests to the Firebase-endpoint (https://fcm.googleapis.com/fcm/send)?
MY Request looks like this:
Request
Thanks alot!

Monitoring new likes and automatically sending a private message

I would need to write a script in order to automate this task:
Monitor new likes on a Facebook Page periodically.
When a new like is detected, identify the person who gave it
Send them a private message, thanking them and pointing them to additional resources that may be of their interest.
Would this be feasible using the Facebook API? The documentation strikes me as a little unwelcoming for the casual observer, and I'm not sure whether this is impossible or it's just that I haven't dived deep enough. Are the three steps above doable using the API?
You can use a cron job to get the number of likes of a Page with the /page-id endpoint.
You can´t get the fans of a Page with the API, and you can´t get the "last liker" either.
Auto-sending and message prefilling is not allowed (it would be spam anyway), and you can only reply to use messages as a Page. You can´t initiate a conversation.

Facebook real time inbox messages with Graph API v2

Does anyone know a way to fetch a user/page inbox messages in real time?
I've found this link, but there is no mention about inbox messages.
The Real-time updates are about... -updates-. That means you will only get notified about changes in the fields described in that link (not regarding the Payments API, that's a different case).
So, you can't get real-time inbox messages.
You can subscribe to the notifications, but I'm not really sure if Messages notifications are included in those...

All Facebook messages from Graph API

I'm building an application for my personal use that saves all my facebook messages in a database on my computer.
But I have a problem as it seems only few messages can be accessed through the Graph API.
I created a token with all the possible permissions.
When issuing a call:
/me/inbox
I get all the threads in my inbox but for some of them the comments field which contains the actual messages is missing. It's mostly for conversation with people that are not friend with me on facebook.
For those threads, when I try to get more information by /<id_of_the_thread>
I get an error (code 100) Unsupported get request. from the graph api.
Is it a normal behaviour of the API?
What am I missing here?
Don't hesitate if you know a better way of saving all my messages.
Another, somewhat inferior, but much more accessible way of obtaining one's Facebook messages is by downloading a copy of your Facebook data through https://www.facebook.com/settings. This way you can download an archive with all your FB data, including your messages. They are however capped to 10,000 messages per conversation, and are all stored in one .htm file, which is not very practical if you want to do further operation on them.
No i think, we can't specified the Thread by using ID, but commonly i'm sorting the threads by its sender. CMIIW