One of the core functions of an App i have been writing, is the ability to send someone a notification. Not from a user, but from the App.
I have successfully managed to send notifications to registered users of my app, that all works like a charm.
I also have the facebook API invitations working so users can invite their friends to use the app.
However, as opposed to most games, where two people use an app together (like songpop, etc), my App should not send notifications from a user that has been using the App. The user should not be known to the person that receives the notification. The initiative for sending a notification lies with the user though.
Documentation on this subject is quite scattered, and on one website it is explained that this functionality is available, while other sites say the opposite.
Is it possible, in any way, that my app can send a one time notification of ANY kind to a facebook user that has not yet authorized my app?
Edit:
Basically, the functionality i am looking for is that user A initiates a notification/message to user B (who is in his friends list), but User A stays anonymous to user B.
You cannot send notifications to users who have not authorized your app. The documenation is quite clear on this:
Apps can send notifications to any existing user that has authorized the app.
Related
I wonder if anyone can offer any advice - If a user likes my page on Facebook, can I somehow trigger a notification to them to prompt them to download my app on iOS/Android? The information I'm finding doesn't seem conclusive.
Thanks!
Just to update people - this can be done under the right conditions. AirBnB do it for example.
If your iOS/Android app uses Facebook Authentication you can harness the Notification API but only if your app has Facebook Canvas enabled.
Also, to send the Notification to a particular user (authed to your app) you must use an 'app token' rather than a 'user token' as you are performing an action on behalf of the app, not one particular user (like when you publish to their feed).
Because of this and the fact to obtain this token you must expose your app ID and secret it is advisable to carry out the notification push using server-side code - not client side or in an app that can be decompiled.
The docs aren't 100% up to date as they contradict themselves a little but you can find more info here: https://developers.facebook.com/docs/games/notifications
I want to create a Facebook app to be used in live events (ie: concerts, conferences, etc).
So the guests would enroll to the event connecting with Facebook Login and asking the publish_actions permission.
The guest will have an Access Card (RFID chip) that identifies himself and links in our database to his Facebook Access token.
Then, during the event, I would like that some actions made by the guests in the event to trigger some actions on Facebook, this actions will be triggered by different applications that communicate with our servers, our servers will comunicate with Facebook API to trigger actions on Facebook.
So when the guest does check in at the event, his Access Card is scanned by the event staff, and then should automatically post a message on his timeline indicating that he is at that event, sharing a link with more details about that event.
We also want to have a physical Photo Booth where the guest has his Access Card scanned, and then takes a picture that should be automatically posted on his timeline too.
So this is not the typical Facebook app flow, as the content is posted automatically by actions made by the user, but managed by our software instead of actions directly triggered by the user himself.
I'm not sure if this kind of application is allowed on Facebook and if it's allowed, how would the review process be done, as this can't be tested using a website or phone app.
Did someone make something similar or knows the best approach in getting this approved on Facebook?
Thank you!
The user MUST login with Facebook and authorize your App. People have tried those things with a specific device where people could login, but Facebook detects multiple logins on one device and may block your App. So the only way is to let people use their own device/smartphone to authorize your App. For example, you could offer them a QR tag with a link to the login flow.
The problem with authorizing before the event and storing a Token is that an Extended User Token is valid for 60 days. So if a user enrolls and the event is 61 days later, the Access Token will not work anymore - unless the User refreshes the Token by visiting your App. So before letting him do this before the event, you can just as well let him authorize the App at the event date.
A specific App for the event is surely the safest way, of course.
I'm making an app that will integrate with the system I've got.
The idea is that in some events that occur within my system, the app can send notifications to users via Facebook.
That is, my app does not necessarily have to have something inside Facebook, the initial idea was only notify the user by Facebook about some event in my system, and when the user clicks on the notification, it would be redirected to my system.
Is this possible? Cause I'm having trouble keeping the Access Token, because those events will occur mostly when the user is offline, and if Access Token I have are invalid for any reason, I will have to get a new one because there is no as the user "re-authorize" my app because it would not be online at the time of the event.
Desired behaviour of my app would be: user that has my app installed can invite other users to install it with a customized request "One of your friends invites to install MyApp". And the requester would be my app (like with notifications API), so kind of anonymously.
Is it possible to customize Request Dialog to do this, or use any other technology?
App generated requests can only be sent to users that have authenticated your application. This is a security measure. If any application could send requests to any user the possibilities of spam would be astronomical.
Furthermore, a user would want to know who invited him to use the application no? What you are suggesting would be extremely problematic.
So to answer your question, no. This is not possible. Application requests to non-authorized users must be sent by authorized users.
How can we send Facebook invites to users of our application?
Usually we receive invites only from friends but not directly from the app itself.
I received an invite from The Sims Social a few months ago and I want to develop the same thing, here is a screenshot:
This kind of request is known as an App to User Request. Only apps that are on Facebook.com or mobile apps can use and send these kinds of requests. Sending them is pretty simple, just make an HTTP POST request to /USER_ID/apprequests with your app access token. You will also want to handle deleting them once they are accepted by the user and reading a list of current requests. They're all documented in the User object docs.
You need to obtain application access token then you can send to the users who are the using this app.
FYI: Authenticating as an App