i have a facebook application and i used Facebook Request Dialog https://developers.facebook.com/docs/reference/dialogs/requests/ in order to send requests.
Everything seems fine, except the notification is not actually sent to the user (i tried with 3 users), though the request is practically from a user to another user.
What can be wrong?
Thanks a lot!
Related
As it is possible to post on users wall without the request dialog using FB.api('Id/feed...), is it possible to send users an apprequests through the FB.api? and not FB.ui(apprequests...).
Thank you for your answer. I really need help on this I have been looking around for weeks...
You can send apprequests from user to user and app to user.
The apprequests from user to user are initiated with the Requests dialog box
App to User Requests can be used to re-engage a user in your app and can only be sent to users that have installed the app. For example, notifying a user that something has changed since their last visit, "10 of your friends are now online".
You can post a apprequest for a user by issuing an HTTP POST request to /USER_ID/apprequests with the app's access_token.
It is currently not possible to send *apprequest*s without the dialog.
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
I'm using facebook API. I want to submit some message to facebook when the app is running in the background. The problem is every time user request or submit a message to facebook, there will show a popup Webview. User need to click it again. So I want to skip this view and submit message in the background . Is this Possible? Can anyone give some suggestions?
Simply request publish_stream permissions from the user and then you can post on the user's behalf at any time, even when the user is not actively using your app (of course this is from a previous user request to have something posted on their behalf). Once you have publish_stream then do an HTTP POST to http://graph.facebook.com/USERID/feed?access_token=AppAccessToken with a message post parameter of the message to be posted to their feed.
As I know, application can not do anything but reciving notifications and presenting pushnotifycations during being in background. The only thing you can - is to ask user "open application rught now to post message to facebook" or something like that.
At the left column on facebook's home page, a notification from Facebook applications appears with a gray character, for example, "APPLICATION NAME [1]".
For example, Badoo app displays this type of notification when a friend has answered my question.
How do I display this notification for my own application?
Your English is great, hkweb. To send the user a "Notification", you must send a POST request to the user's /apprequests connection. You'll need a valid access_token for the user and this user must have "installed" your application before you can send them notifications like this OR use the Requests Dialog. Afterwards, it's as simple as sending a POST to:
https://graph.facebook.com/{USER_ID}/apprequests?access_token={ACCESS_TOKEN}
or
https://graph.facebook.com/me/apprequests?access_token={ACCESS_TOKEN}
The only required parameter to be sent is "message", but you can also send a JSON-encoded dictionary of parameters in the "data" parameter. I recommend you play with the API Graph Explorer. There you can send yourself apprequests with a POST, check your pending ones with a GET and clear pending requests with a DELETE request to
https://graph.facebook.com/{ID_OF_REQUEST_OBJECT}
If you're developing an application on Facebook (like a canvas app), you can make use of the Requests Dialog which makes sending the POST very easy and gives you a friend selector as well.
You can also get the user's pending apprequests by sending a GET request to the same object.
As it is possible to post on users wall without the request dialog using FB.api('Id/feed...), is it possible to send users an apprequests through the FB.api? and not FB.ui(apprequests...).
Thank you for your answer. I really need help on this I have been looking around for weeks...
You can send apprequests from user to user and app to user.
The apprequests from user to user are initiated with the Requests dialog box
App to User Requests can be used to re-engage a user in your app and can only be sent to users that have installed the app. For example, notifying a user that something has changed since their last visit, "10 of your friends are now online".
You can post a apprequest for a user by issuing an HTTP POST request to /USER_ID/apprequests with the app's access_token.
It is currently not possible to send *apprequest*s without the dialog.