Facebook app - implementing notifications - facebook

I'm writing a Facebook app which needs to send reminders to users at set dates in the future. When searching for how to implement these notifications I find a lot of talk about how Facebook removed app notifications and you now either have to use counters or send the user emails. Emails I understand, but there's nothing about "counters" in the graph API docs or the PHP SDK. Could someone point me in the right direction?

The old Facebook rest api had a method called "notifications.send" which is what I think you are referring to but that has been completely removed and you won't see any documentation on it from Facebook's end. You can view the old documentation through the wayback machine. There currently is no other good alternative to this old method besides email/Facebook messaging unfortunately.

Related

Facebook conversions API integration on Squarespace site

We are helping a client who had a recent site redesign done on Squarespace.
With the iOS 14 update the client is worried about not being able to track Apple users for facebook ads.
One solution talked about is to implement the Facebook Conversions API where the Squarespace site would capture data for users that didn't block and we'd get it sent into the Facebook CAPI via a site like Zapier.
There is debate on Squarespace forums whether this is even worth it.
Our developers have not been able to find a clear way to get it done.
Anyone have experience doing this and if so, have then seen that it is worth it?
Thanks!
Jonathon

How did Swarm integrate Facebook Messenger?

Our app requires Facebook to sign-up. Our most requested feature after our beta was messaging, and we noticed Swarm has a built-in button for instant Facebook Message that is essentially a pointer to a new message to said person in the Messenger app. We can't seem to locate any documentation on the feature in the Facebook SDK. Does anybody have a clue how they pulled it off? It would save us from a lot of development time if we could do the same!
http://i.stack.imgur.com/S1Rq2.png
Are you referring to the Message dialog?
If so, it's pretty easy to implement via the Facebook iOS SDK, and involves triggering
FBDialogs presentMessageDialogWithLink or one of the related methods (e.g. photos use a specific method, presentMessageDialogWithPhotos) - there's also a corresponding canPresentMessageDialogWithParams method to determine if triggering the dialog would work
Explanation and examples: https://developers.facebook.com/docs/ios/share#message-dialog
Reference docs: https://developers.facebook.com/docs/reference/ios/current/class/FBDialogs/
For Android it's pretty similar and uses FacebookDialog.MessageDialogBuilder, docs are here: https://developers.facebook.com/docs/android/share#message-dialog

in PHP, how do I check how long it has been since the user last used my Facebook app?

I'm using the facebook notifications api and in the documentation there is a requirement that you only send notifications to users that have been logged in in the last 28 days. Will anyone point me to a php example that shows how to do this with the php SDK?
You need to store this information in your own databases.
Facebook does not have an API to tell you the last time a specific user used your app; the restriction you're referring to from the documentation is a policy/best practice and not a technical limitation on the API as far as I know
If you don't know the last time someone used your app, you may be thinking about the Notifications API incorrectly, as it's intended for notifying existing users of something which has changed since their last visit to the app - if you don't know when that last visit was and what has changed since then, you probably shouldn't be sending them notifications

SMS notification when selected friends are online

I have an idea to develop a Facebook app which notifies the user through SMS when his/her friends come online. The user can pre-select the friends he/she wanted to get SMS notifications of.
This is my first attempt at developing for Facebook so I have zero experience and knowledge about the platform. I just want to know if my idea for such an app is possible? Does Facebook have an API for SMSes? Or do they let 3rd party messaging APIs (such as this one I came across) to work with them.
Thank you.
A Facebook app is actually ran off of your server and you can do anything that you want as long as you stay inside the limits of what you requested as far as information the app needs. As far and getting the information it is relatively easy. I made a extremely complicated app in 3 days. Once you read and get how to pull certain information, the rest is cake walk

facebook app, notify the user

I'm pretty new to facebook app. I want to make a simple app for learning. I want to create an app that visits mysite.com/page.json and prints some pretty html. Then i'd like to scan the json for 'private_message' and notify the user (and not publicly post on his/her wall) about the pm and print the message in their notification area.
The later is mostly what i want to learn. Where can i find the API reference? I looked at fql/notification but it looks like its looking at the notifications when i want to post a notification.
Applications cannot send private messages to users. Here is the discussion about it on the facebook developers forums.
Applications only have read-only access to the message inbox with the read_mailbox permissions.
I've gone through as much documentation on this topic as I can find on the Facebook's developer portal, and all I can find are ways to read notifications (the world icon at the top of the page) and mark notifications as unread, but I can't find any way create them. The best documentation I found on this topic was here:
http://developers.facebook.com/docs/reference/api/user/#notifications
Anyone have better information about this?