Send app invite requests to friends via Javascript SDK - facebook

How do I send facebook app invites to multiple friends of the authenticated user via Javascript SDK (I'm not using the facebook Request dialogs because I need a slightly customized dialog whereby I could allow a different action for those friends that are already users of my app).
Also I want to clarify that my app is not a game but an webapp like StackOverflow itself but I allowed it to be a Canvas app on facebook(just to be eligible to send app notification, do I need to consider more seriously when making it as a canvas app, downsides?)
Thirdly, Am I eligible being a webapp(which is not a game) to send invites on behalf of users & other notifications to user? I ask this because most of the places I saw requests docs, it mentioned for games not general webapps/websites.

Related

Facebook Oauth-enticated users, chat between themselves on website

I have a website where users log in with Facebook. Right now there's no way for users to contact each other.
I was thinking of building a dedicated live messenger with sockets, but I wonder if there's an easier way to allow them to send messages to each other's Facebook Messanger, since they are already logged in with facebook.
There is no API for a chat between two users. Everything in Messenger API is focused on communication between a user and a page.
At most you can use the Send dialog to let a user send a link to their friends, but that requires the user actively using the button, you can not “automate” that; and handling the result will have nothing to do with your site any more, everything after that will happen in messenger only. https://developers.facebook.com/docs/sharing/reference/send-dialog

Send app invite request for a website to all friends of user?

I implemented a custom friends selector to send app invite requests for my website to a user's FB friends. But that show no of limitations, first that invitation may be sent to at max 50 people. I have seen games on FB sending app invite requests to user's all friends, wont that same kind of invite work for my website ?
Secondly Using the requests dialog with friend selector, there is no way to select all friends for invite. How could I make it better towards sending app invites to user's all friends ?
At some places in the FB devlopers docs, they mention explicity games & apps on facebook. If I am a website with a FB canvas page as well. Can I use the services availble for games on facebook? (Is it Legal ?)
App requests are for games, not for sharing a website.
The only serious (and not spammy) way to share a website on Facebook is to use the Send or Share Dialogs:
https://developers.facebook.com/docs/sharing/reference/send-dialog
https://developers.facebook.com/docs/web/share
You may want to read this too: https://developers.facebook.com/docs/apps/faq#invite_to_app

facebook app request for non-games apps

in the Facebook API documentation for requests it says that you can send app requests to friends but it's in the game section! now my question is whether it is allowed for non-game apps to use the send request dialog or not?
There is in fact a current hole in the Facebook API regarding web invites to non-game canvas apps. The Facebook API changelog from v 2.2 to v 2.3 states that the apprequests function that opens the Request Dialog is now only limited to games, and that non-game apps should use App Invites. However, App Invites work only in iOS and Android.
So currently, there is no way for users to invite friends to a non-game canvas app via the web, except by using the Send Dialog which is a lousy user experience and really shouldn't be used for that.
I have filed a bug report with Facebook and they have acknowledged it is a valid bug. Let's hope they fix it soon.
https://developers.facebook.com/bugs/895531977178531
No, it's not possible (or at least legally) to use the app request feature for non-canvas apps that are outside the Facebook domain. For example, https://apps.facebook.com/angrybirds is a canvas app which is inside the Facebook domain and can use this feature as well as send notifications to other people on Facebook.
Even though, you can still send invitations to friends and they will see them on https://www.facebook.com/games/activity on the tab ìnvites, but they will not receive any notification.
There's still possible to make a canvas app that only redirects to the page you want, but that's against Facebook policies.
This is an extract from the latter:
Don’t build an app whose primary purpose is to redirect people off of Facebook.
The closest solution is to send email through the Send dialog feature but that's not intended to invite friends in the way you want.
You can find more references on this other thread.
As per the Facebook documentation:
https://developers.facebook.com/docs/apps/faq#invite_to_app
"If your app has a Canvas presence but is not a game, you should just render the Requests Dialog. Access to the Invitable Friends API is not required in order to let people invite their friends to use your app."
This is pretty hard to find since most of the documentation pertains to games or mobile apps. This is the only reference to Inviting friends to non-game canvas app I could find.
Since the Invitable Friends API is only available for games, what this tells you is to just use the generic Requests Dialog WITHOUT using the Invitable Friends API.

Invite Friends Modal for Website off of Facebook

How do you allow your Facebook Connected users to invite their Facebook friends to your website?
All previous answers on SO are outdated referencing that it was previously possible with fb:multi-friend-selector, but since FBML will soon be deprecated, its not an option worth entertaining.
The only option I see now is to create a canvas app that redirects to my website but I would assume this is not permissible since only Canvas or Mobile apps can use the Requests dialog. I could build my own modal by getting the users friends and then sending them a message directly--also probably not permissible.
Nikolay did a fair assessment here, but was not provided a solid answer. Is Facebook locking down multiple friend invites and leaving only newsfeed posts and likes to webpages?
I use Social button like recommend and implement it with my site. ref to https://developers.facebook.com/docs/plugins/
So, we looked and it appears you cannot use the Invite Friends modal unless you are a mobile or Facebook canvas app.
We did, however, come up with a solution. Using the Open Graph API (see Publishing) and the publish_stream extended permission, you can post directly to a user's friend's wall. It cannot be a private message (publish_stream does not allow you to change the privacy of the message) but it does allow user's friend to get a notification of the post.
You can see it working in some of our developer's games on www.pokki.com that are supporting our Pokki Games API. We came up with a nice modal that shows the user what the message they'll be posting looks like. This puts the user in control so they can click on their friend in a list of all their FB friends and makes the message more genuine (rather than automatically spamming all their friends with disingenuous messages).

For friends on Facebook, should they automatically be friends on Facebook based apps?

For an app that allows user to login in with Facebook, and will support scenario where friends can be involved, should the app automatically setup the connection within the app's context? Such that for user A and B who are friends on facebook, and both logged in the app with their Facebook account, the app will automatically treat them as friends in the app's social graph.
It depends on your apps nature.
For example on Foursquare, if one of your friend started to use the Foursquare through facebook, they send you a notification stating that
Ohhh! Looks like your Facebook Friend XXX is on Foursquare. Friend
them?
and another app DrawMyThing, automatically connect you with your friend and involve your friend in your activity automatically.
So what important is the nature of your app.