Customize Request Dialog - facebook

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.

Related

Send Facebook notifications to users

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

Using facebook with my robot

I develop a robot which is connected to the user Facebook profile. If the user receives a message, the robot tells the user to check his inbox (or it can even read the message aloud).
For that, I want to create a website where my users can register, and where they can connect their accounts with Facebook profiles. The website communicates with Facebook to receive any new information. And the robot connects to the user page on the website to get that information.
My question - is it possible to make it that way? Does the API rules allow it?
EDIT: Especially, I want to know if API rules allow it.
You could make use of the Realtime Update API (https://developers.facebook.com/docs/graph-api/real-time-updates).
Therefore, you need to setup an endpoint (service) with handles the push notification from the Facebook platform.
Once you did that, you can "listen" to the inbox connection of the user object. FB will tell you if something changed, but not what exactly has changed. So you need to implement an active pull of /{user_id}/inbox and compare the actual result to a cached past result.
Be sure to gather the "read_mailbox" permission with your app.

Facebook sending one time notification

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.

Send invites from the app itself

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

Can we send private messages to friends of a user with offline_access permission?

Is it possible to send private messages to the friends of a user after getting the offline_access permission from him?
While sending app requests, I know its possible to send app_requests to any user(using app_access_token) who is already a part of the application. Like wise is it possible to send using offline_access permission without using send dialog or any other operation which needs the user consent?
No, this is not possible, the only Facebook communication channels you can use are stream Posts and App requests, and if the user is offline, you cannot publish posts as it is against Facebook Platform Policy IV.3.
If this is user-to-user communication, you may be able to send an email to the users username#facebook.com email address, which will create a message for them. However Policy IV.5 explains the limitations of this.