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

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

Related

Facebook periodic review is unclear

in order to approve your app’s continued operation on our platform.
Platforms affected: Connect URL.
Developer Policy 1.2: Build an app that is stable and easily navigable.Some common violations of this policy include:
- Broken Facebook integration (e.g. broken share, like or comment functionality)
- Broken user experience in the app (e.g. app has broken links or user interface failures)
My app:
Using https://www.npmjs.com/package/hellojs v1.18.8 to query user info from facebook.
The request URL:
https://graph.facebook.com/v2.9/me?fields=email,first_name,last_name,name,timezone,verified&access_token=.....
calling out hello.js
hello(auth.network).api('me').then(function (json) {
App has no share, like, comment functionality and not really any user interface. Just our page offers ability to fill some data with facebook and then it remembers you with cookie.
Anyone has similar e-mail and what to do?
Our app does not use share, like or comment functionality neither do we provide any user interface for users (only the o. We are using Facebook to prefill some user data on our site.
Have the same unclear message "Platform affected: Connect Url".
I asked for a more detailed answer and received an answer the next day:
Thank you for your response.
Facebook periodically reviews the websites and applications which are on it. Your application is in its review process currently. We are required to test the Facebook login functionality in order to conclude the review in totality. However, we are unable to do so.
Unfortunately, we have not been able to locate a Facebook integration (Login, Share and Like) on your submitted platform. To help us conclude the review process, could you kindly share the details regarding the location of a Facebook integration and how to navigate to it on your website URL.
This review is essential to Facebook as we want to offer the best experience to users as well as developers like yourself. Please help us in bringing your application into compliance by working with us.
Alternatively, you could aid us by sending us credentials of a test user which is already registered and connected to an FB account within the app. You can get all the information related to creating a test user here - https://developers.facebook.com/docs/apps/test-users.
Please feel free to get in touch with us regarding any doubts or queries you might have.
Thank you for your patience and cooperation.
Looking forward to hearing from you.
My app contains the functionality of a facebook login. I made an instruction and a test user of the application so that Facebook employees could test the functionality used in my application.
Normally they write down what is wrong and explain how to fix it. If you are not sure you can reply them back and ask how to fix it. I manage to fix my issue which was similar to the one explain below by emailing facebook.
https://technuisance.com/facebook/facebook-policy-warning-for-app-solved.html
I got the same message from Facebook two months ago. In my case, I didn't find a solution in time and Facebook penalize me by deactivating the app.
Therefore, you must attend to it if you do not want the same to happen to you. Facebook uses software similar to this to check for failures on your site and assigns a score according to its performance. That's why they send you such a generic message.
I suggest you use PageSpeed Insights to receive a report on the performance of your website. In addition, the platform gives you suggestions for optimization and improvement; Surely there you will find some clue of what may be failing.

How to retrieve Facebook home news feed for apps?

I am currently attempting to retrieve the news feed from my Facebook home feed to include into an app. I know this used to be able to be done with the API however I have heard that it has since been removed. Is there any other way that you know of that would work or has it been added back into the API? It doesn't make sense why they would remove it.
No, there is no way to get a user’s feed via API. That used to be possible in the very early days (API v1), but has long since been removed.
It doesn't make sense why they would remove it.
Apart from user privacy (I don’t want my posts getting analyzed by some shady app with a developer located in $godKnowsWhere, just because they appeared on the feed of a friend of mine who might be using questionable apps), Facebook considers this a “core feature” – and 3rd-party apps are not supposed to replicate those in the first place. Facebook wants to make money from showing me ads when I view my feed, so allowing any other app to perform the same functionality would just mean loss of revenue.

Facebook app id for website social plugins

I have like/share buttons on my website and am not currently using an appid. Finding information on whether this is a necessity for the above configuration is difficult to confirm. When going through the Facebook app "create" forms, I'm really confused by a lot of the requirements as it seems to be more focused around actual apps rather than websites, which login via fb etc.
In the past I have created an app for one of my other websites and I don't believe there was any verification/submission process at this point (about 2-3 years ago). Reviewing my old app configuration now I can see that it is not "live" - does anyone know whether Facebook implemented this submission process in the last couple of years, and then de-activated any live apps that were created prior to this?
I now want to setup a new app for my new website and I'm unsure what the different 'action types' mean and what I would need to simply use like/share buttons on the website. Could someone give me a quick run down of what I'd need and what they are?
Any other info/tips people can provide would be greatly appreciated. I'm finding that the like/share DO still work without the app, but sometimes the share button doesn't work properly (I have a feeling this is something to do with the app).
Thanks
If you are just using the Social Plugins, you don't need to have a Facebook App ID.
If you want more integration, it will be required. Creating an App ID is like registering your App, wether an iOS or Android App or just a website, so that you can make Graph API calls for it.
The easiest way to register your website is to go the quickstart: https://developers.facebook.com/quickstarts/?platform=web (or https://developers.facebook.com/apps). There you can type a name and follow the steps.
You can then follow the "Sharing best practices" (https://developers.facebook.com/docs/sharing/best-practices#tags) on how to use the App ID. For example, by including an fb:app_id meta tag on your pages.
There is a review process, since last April, but that is only needed if you use permissions for your App. If you just use the plugins, that is not needed.
Can you explain more what is exactly not working?
Update
The time you create a page the Facebook crawler does not know yet what the Opengraph data for that one is. This will happen after the first share, but if you want to ensure it is correct from the first share on, you can force a re-scrape.
This section explains how that works:
https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
When an app triggers a scrape using an API endpoint This Graph API
endpoint is simply a call to:
POST /?id={object-instance-id or object-url}&scrape=true

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 - implementing notifications

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.