Invite Friends Modal for Website off of Facebook - 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).

Related

Does Facebook send notifications to my web page by the fb app?

I have searched on Google and Fb's documentation about this but didn't find anything.
I've already shared content of my page on Facebook with the Share button provided by FB's api and also made an app on Facebook.
Now I want to receive notifications in my page when someone comments the publication or likes it.
I know that I can consult the posts/comments/likes if the user gives me the permissions, but I don't want to do this every 5 minutes. I want that facebook notifies me like a push notification.
How can I do that if it's possible?
Thanks!
After the user shared something on his wall, there is no way for you to get notified about comments/likes on that wall post, unless you authorize the user with user_status or read_stream.
That being said, there is the Realtime API with the feed and statuses fields to subscribe to: https://developers.facebook.com/docs/graph-api/real-time-updates/
That´s probably the best option, although you must authorize the user with the correct permissions too.

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.

notifications or posts with facebook Login using graph api

i am building a website with Facebook login. is it possible to send a post to my friends time line or notification to my friends using graph API. i want to build invite Facebook friends to my website. can some one help me on this
Posting to the timeline of a friend was remove a long time ago, because it´s considered spam in most cases.
Notifications cannot be sent to friends either, luckily ;)
There are "App Requests", but they are only allowed for games on facebook.com and not for external websites.
The best (and easiest) way for you is to use one of the Social Plugins:
https://developers.facebook.com/docs/plugins/send-button
https://developers.facebook.com/docs/plugins/share-button
https://developers.facebook.com/docs/plugins/like-button

Code for inviting friends

I need a code for inviting friends to a fanpage.
http://developers.facebook.com/docs/reference/dialogs/requests/
This is linking to the website. Is it possible to link to my fb fanpage?
Actually if you read the whole documents, that Request feature is for Facebook Application only. But here's a work around :
Create a Facebook Application
Have a great content where everyone wants to have
Put a Like Gate before they can access your great content
You can still use the App Request for your app while the user likes your page

How can a Facebook Platform website using Facebook's API send invites to a user's friends?

I realize these questions have been asked before on Stackoverflow, but now that FBML is being deprecated, it seems like the answer may have changed.
I have a website that utilizes the Facebook API, which in current terminology I believe makes it a Facebook Platform website. This is now a Facebook Canvas App, which are apps that appear on Facebook itself in iframes.
The Requests Dialog would seem perfect for this, if not for the fact that it's tailored for sending invites for Canvas Apps, and in my case, the Canvas App is simply a blank page assigned to me when I got a Facebook API key. I suppose I could just put a welcome screen and a link on that page for users to click-through, but it's one more click and that much more friction, and a generally hackish approach.
I've found references indicating there was once a way for users to utilize FBML to send an Application Invite, which is not the same as a Request Dialog, such that when a recipient click Accept, they were sent to a URL instead of a Facebook Canvas App. However, as I noted, FBML is in the process of being deprecated.
In light of this, how can a non-Canvas website allow users to send invites to their Facebook friends?
The requests dialog is currently the only supported way. As as alternative you can use the old Facebook REST API to call notifications.sendEmail, which will send the user an email either to their actual email account or their Facebook mail account. That page says that an equivalent graph API method will eventually come to replace this method.
I ended up using the Request Dialog, and hosting on my canvas page a redirect as per:
Redirect User to my Website on a Facebook Canvas Page
Gave the nod still to OffBySome's answer, though, because of his useful information that led me to settle on the Request Dialog.