Invite friends for a website app (FB.ui apprequests)

5.8k views Asked by At

I have a problem with making apprequests for my website application. I can send invite with FB.ui "apprequests" method but this request is not shown on Facebook. It looks like it is blocked because it fires notification icon but in a second notification disappears.

I've found a workaround. I set application also as a canvas and make redirection from canvas to the website page. But I don't know if it will not be blocked or something in the future.

What is the recommended method to send an application requests from a website application?

3

There are 3 answers

2
Roberto Andrade On

From my experience and from reading the Facebook Developer Guide, it seems like it's mandatory for you to have a Canvas defined for your Facebook app so the requests render as Notifications.

I am trying to solve a problem where these notifications show fine in the Facebook website but not on the Facebook Android client's notification popup.

5
JuSchz On

I personnally use this code, that works :

FB.ui({method: 'apprequests', message: 'my message'},function(response){'my callback'});   

I hope this will help you.

0
Tod Birdsall On

After a bit of research and trial/error, I found that that you must use canvas.

So, to get my users out of canvas and onto my site, I created a static landing page with a large "Get Started" button hyperlink with a "target='_blank'" tag. This opens my site into a new browser window. I then used that static landing as my "CanvasURL / Secure Canvas URL" for my "App on Facebook"