I am trying to send some specific content from my Application to the user's status wall.
Lets assume that the user already logged in to facebook through my app - And lets say that my app displays a lot of jokes and riddles. A user finds a joke and he/she wants to publish the joke to his/hers facebook profile (Or even send it through SMS too? (Just a side question, not important))!
How is this possible?
Thanks!
Construct a JSON object with the appropriate Graph API fields corresponding to your joke, and send it to the Graph API using an XHR requestWithGraphPath. For text messages, you might take a look at Twilio.
Related
We are having a problem with the review of our app which needs FB user's authorization to publish a post to his wall (publish_actions permission rejected by FB reviewer). The post is a promo offer developed by some retail store which is generated on server and needs to be put on user's wall.
We are seeing this in many cases by apps that are approved by FB but the reviewer has stated this: 'Make sure the user message area is not pre-filled in any way by the app otherwise the submission will be rejected. This includes hashtags, URLs, and any other text not written by the user.’
What we see in many cases is that the message is pre-filled with text from a publisher so that when its posted to the wall you see an image with some text including a link to the FB page of the publisher. Does anyone know why we are not allowed to do the same?
Prefilling is not allowed. It does not matter if you see it in another App, it´s still not allowed. If you believe an App does it, report it to Facebook.
Also, the user profile is not a place to advertise, each and every single post to the user wall must be written and authorized by the user. You can only add a link with Open Graph tags to it. See the docs for information about all the possible parameters: https://developers.facebook.com/docs/graph-api/reference/v2.3/user/feed#publish
I am working on a business application which is using facebook and I need to send a private message to a connected user friend.
For getting all the user friends, I am using me/taggable_friends. In this way I have all the user friends but I can't retrieve the real friend user id. I need to know this field for sending a private message (or request or notification).
Regarding the FB documentation, this feature is only available for the "games" product but it's look like strange.
Maybe i'm doing something wrong but I don't understand how should I proceed.
Thank's for your answers.
taggable_friends can (and should) only be used for tagging friends, you don´t even get an ID with it, only a tagging token (see Facebook docs).
For sending private messages, the best (and only) way is to use the Send Dialog of the JavaScript SDK: https://developers.facebook.com/docs/sharing/reference/send-dialog
The user has to input the target friend and the message on his own, which is a requirement for the message anyway. It always has to be 100% user generated.
The Chat API is deprecated and should not be used anymore: https://developers.facebook.com/docs/chat
On iOS, if you want to send a private message to another Facebook user, you should use the Message Dialog: https://developers.facebook.com/docs/ios/share#message-dialog
This lets a user share a message with any of their FB friends, then return to your app. You can ensure the message contains a link which the recipients will be able to click on.
Working on my second app and the first using the new Request 2.0 and other recent features.
I've managed to get the app to log a user in and grant the extended permissions.
My app is simple: I want a user to be able to send a message to a friend along with a user-selected graphic to go along with the message. I guess the basic metaphor is a gifting app.
I'm not wrapping my head around the workflow especially as examples using the new Request 2 dialog seem few and far between.
Here's what I'm thinking the beginning of the workflow looks like:
User arrives at app page. Logged in, permissions granted if needed
User selects a graphic (via an html radio button form) to go along with message they enter into an html text form
User selects friend(s) to send the message/graphic to.
I'm assuming I should toss the senderid, receiverid(s), link to graphic (or id), and message into a database.
How do I get the info from my users' selections? Does hitting Send Requests on the FB dialog POST the FB and form POST info to the same page so I can read them via PHP $_POST variables?
When the person receives the request, they accept it, but how do I get them to go through the requests outstanding and display the graphic and message? i.e. Archie logs in and has 6 friends sending him items through my app. How does he, in FB methods, see the message/items that Veronica, Betty and Jughead have sent him?
I don't mean that in a basic way. I know how to do this all if I was just writing a PHP app on my own site. I'd be finished in a few minutes. The part that's causing a head-shaped dent in my desk is trying to work out how it works adding Facebook to the workflow. I've been looking for examples and tutorials but they seem to be out-of-date to the new methods FB wants us to use.
Thanks for any pointers!
When a user follows a request you have access to that request ID. If you need to access additional requests the user needs to "Connect" with your app so you can read that info from the user object. The request ID for the acted upon request will be available to you on your canvas page and it will be up to you to develop a work flow that authenticates the user to be able to access any other requests for that user.
The related blog post that discusses the process is available here:
https://developers.facebook.com/blog/post/464
i'm developing an application for a university exam, using Appengine and Gwt (Google products) and i'd like to implement Facebook this way:
- give the ability to a FB user to login to the application through facebook (did this implementing the oAuth2.0 flow, so now i have the user's access token and his permissions)
- since the application is for being notified when a professor publishes some material for his course (this is all handled by appengine), i'd like to notify the user when a professor publishes some material, through a wall post or a note from my application in a way that it writes to the user something about the new published material.
I've been looking through EVERY single resource online, and couldn't find an answer: a lot of similar questions but no answers.
Writing the POST is not a problem, and for the moment i'm trying with the api graph explorer.
I manage to write on the user's wall/note as if he's writing himself or (if the user likes the application) write all the likers a wall post/note (but the same to everyone).
But i don't find a way to send personalized wall posts/notes to every user in response to some specific material published.
FB doesn't allow to do this because is considered spamming?
You can't directly post things to your user's wall as a way of notifying them - wall posts are intended to be things the user posts from within your app (for instance, they find something in your app interesting and choose to share it with their friends, so they click a 'Share' button).
You could try using an App-Generated Request (http://developers.facebook.com/docs/channels/#requests). This will increment the user's Bookmark Counter, and when they click on it they will enter your app and you can show them the latest news.
OR, you could ask for the 'email' permission for your app, and send the user an email notification when something is new.
FB.ui Request dialogs: (With method: 'apprequests') allow you to send a request from your app.
http://developers.facebook.com/docs/reference/dialogs/requests/
This says, you can specify one friend in the two value. However I want to specify N friends which are preselected, but can be edited. Is it possible in this widget. If not, What alternate widgets can I use
This isn't possible via that Facebook javascript sdk, most likely to be less spammy and not default to sending to every single person a user is friends with. The way to get around this would be to build your own dialog using the graph api. You would retrieve all the users that a person is friends with, present them with your own dialog to let them choose users, and then send graph api requests over for each request.
Update:
Per Facebook's blog post, you can only send invitations to users through their Requests dialog. And this dialog will not let you pre-populate all users as checked. Graph api can only send to other users that have authenticated with the app.