getting all notifications - facebook-graph-api

I can easily get the unread notifications with this query:
https://graph.facebook.com/USER_ID/notifications?access_token=ACCESS_TOKEN
Is it possible to all the notifications (marked as read) too?

Yes, you can specify the parameter include_read as 1 to indicate you wish to receive read notifications.
https://graph.facebook.com/USER_ID/notifications?include_read=1&access_token=ACCESS_TOKEN

this link may be help you
http://developers.facebook.com/docs/howtos/notifications-api/
Using The API
Applications can generate notifications by issuing a HTTP POST request to the /user_id/notifications Graph API, with a app access_token.
POST /{recipient_userid}/notifications?access_token= … &template= … &href= …

Related

Slack api activate users.getPresence() method

I have problem with slack api exactly every change in slack is saved in separate json file.But problem is that I want to get when user's active/away change in json,but I can't get this information in json.I found that there is user.read scope with users.getPresence() method.Also users.info() method in user.read scope works and I have json with that information.Any ideas why one method works but another doesn't work?
You seem to be using the Slack Web API in place of the Slack RTM and events. What you need is to subscribe to the presence_change event. Ensure you subscribe to presence events for the specified users using presence_sub. You will be notified when a user changes the presence and from the response you can fetch and parse your json. Find more about this event here

messages API twitter Challenge-Response Checks

I've seen that twitter changed their endpoints to get and send direct messages, I noticed from a reply from here that it is a workaround to be able to send messages with well-known libraries such as tweepy, but all I need in this case is to list the messages in my inbox.
I've noticed that there is an account activity api which I can use to achieve this goal.
But, I do not understand how to implement Challenge-Response Checks, can you provide an example? how twitter checks this? it is through a post request to my site? to what specific URI they do this? I tried sending a pipedream url as webhook (to see what kind of request they were doing, but absolutely no request was shown)
The account activity endpoint is part of Twitter's Premium product - so you may need to pay to use it. They have comprehensive documentation on the CRC - that includes a sample Python implementation.
I think you will find it easier to use to use the GET direct_messages/events/list API call.
That will list all of the messages in your inbox for the last 30 days.

Aftership webhook tracking API

I am developing one e-commerce app project where I have to track the order status. I use Aftership Webhook API. Webhook provides a tracking event updates to our specified webhook URL(defined in our server). I read documentation but I dont know the proper approach to test the API. and in documentation it is also not defined. Can anyone tell or suggest me how can I test or track the updates.
To test Aftership API, first, you can follow the API reference to get your API key. And to tracking an order with webhook, your need to do the POST /trackings to https://api.aftership.com/v4 beforehand with body like(you can add optional parameter to the request body):
{"tracking": {"tracking_number": "<order tracking number>"}
And then you can follow the webhook documentation and add your webhook URL and configure the types of updates you want to get. At this point, you should be able to see the tracking update HTTP request coming into your webhook URL. Remember it will only send callback request when there is tracking status update.
Also, you can use other tracking APIs to get the status, update the tracking or delete it now.

Reading facebook direct messages

Is it possible to read direct messages using the facebook graph api? I can see a reference to a message object in the docs (http://developers.facebook.com/docs/reference/api/message/) but can’t see a call to get a collection of messages for a facebook page.
I eventually found this in the notifications call in the graph api ...
https://graph.facebook.com/id/notifications
I needed manage_notifications and read_mailbox extended permissions for this to work as well
using graph api and fql you can read messages
see https://developers.facebook.com/docs/reference/fql/ thread and message
be aware there is any difference for FB backend if a message has been sent from during online chat or while offline from chat

How to track messages from Facebook API

I´m trying to track messages sent to my Facebook friends.
For example: I sent a message to James Bond, how do I know if he read it or not?
The Facebook Graph API does not support this yet - http://developers.facebook.com/docs/reference/api/message/. I suspect this is because there is no guaranteed way to see if a message has been read or not based on how the user accesses their messages.
It would also require permission tokens to be passed in a three-legged (recipient to application, recipient to sender) verification.