How do I send one user a private message in a facebook app? - facebook

I'm trying to make a mafia-like game on Facebook, and to do this I would need to be able to tell the mafia users that they are 'it' if you will without telling everyone else involved in a given session that they are 'it' and thus defeat the purpose of the app in the first place.
I have checked other sources, which were people asking to mass-message people or people were asking about iOS programming via facebook. Any ideas?

Use the Request Dialog 2.0 API.
https://developers.facebook.com/docs/reference/dialogs/requests/

Related

Alternative for Facebook request for non-canvas app?

I have an app where a user creates some object and invites people to interact with it. It's not a game and it's not a canvas app.
I tried to get requests to work probably and couldn't
After reading a bit, I understood that these don't work for non-canvas apps anymore.
So...
1) Does anyone know if this is going to stick? It's extremely painful that stupid games like candy crush are allowed to create requests, while apps that might actually provide users real value can't. If there's anyone from FB here, I'd really like to understand why this discrimination is taking place?
2) Are there any alternatives? Sending a message or feed post are possible but, I need to either a) generate a unique link per invitee or b) get the list of people the user sent the link to. Both don't seem to be an option with messages and feed dialog.
3) Is is ok to just embed my web app in the canvas as is?
Thanks
Yaron
Facebook policy indicates that you should not use app requests to send users to an external website. However, an embedded web canvas app is fine. It will let you use the apprequests function to render the Request Dialog and provide a user invite experience similar to the most popular Facebook games.

Store data of people who clicked on a button on Facebook

I would really appreciate some help with the Facebook application I currently work on.
I developing a simple Facebook application, and I need to store the data of the people, who click the "I want to win button". I'm not sure if I should use plain, old vanilla PHP, or if the Facebook API provides some simple way to do that, so I would be really glad for some ideas about this.
I read about the topic, but I can't really "see the Matrix" yet, so every answer is appriciated. Also I'm more interested in ideas and not the implementation, as I'm fairly confident in my programming skills.
Thank you everybody!
Richard
You will definitely need to use an external db, coz facebook will not store the data for you. However facebook does store the connection that a user makes with the app, i.e. when a user gives some(even basic) permissions to your app. Hence when an old user comes to your app you can know which, and if it is an old user.
Facebook sends your entry script a signed_request, which contains data about the user visiting your app, this request will have a user_id field only if the user has made the connection/authorized your app, hence you know if it's an old user or new.
Once you have the user_id you can call the graph api to get info about the user. In the php SDK you can easily call $facebookObject->api('/me','GET'); to get user info.
You can easily call the functions anytime, so if you want to make a call when a user clicks your button, you can do that.
Check out the links i have included, thoroughly, you'll get the idea.

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

Displaying MY public wall using AS3 without user login

I've been trying to get this to work for a while, but I've apparently missed something.
All I want is to have the latest 3 or so posts from my clients Facebook page to populate and animate in a screensaver that I am building using Flash (AS3).
So far, every time I try to bring anything in, it requires a complete oAuth login and account link, but it's only a one way exchange (read-only, absolutely no writing, posting or even linking, since it's a screensaver) I'm not even sure the client wants pictures or anything.
I am currently trying to use the facebook-actionscript-api, but there isn't an option for the "App Login" type of Authentication that would solve most of my problems.
I'm at wits end and about to have to tell my client it can't be done. At least they'll always have twitter...
I don't think it is possible to get facebook feeds without an accesstoken (even if they are public). So I guess you need to define an app within Facebook and add login stuff to your app so users can give permission to your app for basic access.
Maybe this article offers some help: http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.html

Send message to a non-friend facebook user?

I am developing a Facebook application. It must notify random people on Facebook about a certain event that happens related to them. I mean random people - not just those who installed the app, that's a key point.
Yeah I know it sounds like a spammy annoying application, but I swear, it's not that kind that everyone hates. :)
Is there a way to send anything (wall post? message?) to a user that did not previously installed the app?
No, that's not possible as per facebook's privacy policy. There should be some sort of connection like friendship/application user to do this.
It is possible, but only if you direct the acting user to the send message URL in a new window. If you are talking about an automated way, it is not technically possible at the moment.
It is possible through request dialog api: http://developers.facebook.com/docs/reference/dialogs/requests/