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

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?

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.

I personnally use this code, that works :
FB.ui({method: 'apprequests', message: 'my message'},function(response){'my callback'});
I hope this will help you.

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"

Related

Understanding Facebook SDK app requests vs app invitations

I registered a Facebook app that is basically the website, it doesn't run at Facebook like those browser games.
I want the site users that register with Facebook to be able to invite their friends, I did this by using "requests", it opens a Facebook hosted URL where I select the friends to invite, looks like this:
But these requests only show on receiver's end if he/she goes here , I don't even where to click to reach that page, and from other users I receive invitations to apps that they show in top right corner under the globe icon, how do I do that ? Or is that limited to "canvas" applications that run directly on Facebook ?
Are there different ways to invite people to an app ?
I want the receiver to see it like this:
Not like this:
As #CBroe has already stated, Invites / Requests are limited to Canvas Apps (Apps that work within Facebook) or Mobile Apps. The app category also has to be configured to be a game (another category won't work).
The facebook documentation says:
Requests are currently only available for games on Canvas, iOS or Android.
In order for the Request to work, you need to configure the Canvas Page URL:
When a user accepts a request, either through the notification jewel, the beeper popup, or App Center they will be sent to the Canvas Page URL of the app that sent the request.
Read up on the Request documentation.

Facebook canvas app - blank page

I am having a weird issue with facebook canvas application and clicking on app request notifications.
Basically if you are in the app, and someone else sends you an app request for the same app, then the notification globe will show the request. If you click on it then it just shows the message loading 'app name' and goes blank.
Works perfectly if you click on the app request while not using the app (e.g on facebook homepage).
I tried using js developer tools and it looks facebook is performing an ajax request which is not returning anything (hence blank page I suppose). The url for the ajax request is
http://apps.facebook.com/ajax/canvas/storyboxfb_app_name=appId&_user=userId&_a=1
Anyone got any ideas??
Well the issue seems to have disappeared after I supplied an app namespace. Seems like it only occurs if you use the default app id as the namespace.

Tab App (FB) wont show on Facebook iPhone App

I created a facebook and placed it on my facebook brand page, I also created a post on the wall of that page with the link to the app.
all works well until people started calling me saying that when accessing using FB iPhone app it will redirect to an error page "the page your requested was not found"
I tried adding a link (same page) to the "Mobile Web" link of my app in the FB Developer App.
it still doesn't work..
I need people accessing the app page to get some content.. I know it is possible but cant find how..
thanks for your help
Tabs aren't supported via the app or mobile site. Best you could do is add the query parameter "ref=ts" to prevent the page from going switching to mobile. It helps in the browser but not the app itself.
So add ?ref=ts to the end of your app url and at least mobile users can see it in their browser.
http://facebook.stackoverflow.com/a/10833366/461119

How to redirect your "Go to app" button to lead users to your website

i set up a new app-- when my users recieve the permission scree, after clicking "Go to app" i want it to redirect to my own website (ex.www.mysite.com) instead its redirecting me to my website within facebook.
Since my website is not compatible within facebook, i need the app to lead users to my site- how can i do that?
The url that the users are being redirected to once the clicked the allow button is the url you provided in the "redirect_uri" parameter when you sent the user to the oauth dialog.
Instead of specifing your fb app url (apps.facebook.com/APP_NAME) you can use ex.www.mysite.com (as long as it's the same as what's in the app settings).
Another thing that you can do is to just reload the page using javascript:
top.location.href = "ex.www.mysite.com";
With all of that said, you should not be doing that.
It cleary says in the Facebook Platform Policies:
The primary purpose of your Canvas or Page Tab app on Facebook must not be to simply redirect users out of the Facebook experience
and onto an external site.
If your app has a Canvas presence, then the Go To App button will redirect to your canvas landing page. For example http://apps.facebook.com/yourapp
If your app is strictly a Connect app then the Go To App button will redirect to your site outside of Facebook for example http://www.yourapp.com
If your app has both Canvas and Connect implemented, it will go to the Canvas page.
The relevant settings in the Facebook developer app are under "Select how your app integrates with Facebook". You do not need to have any canvas presence within Facebook.com. You can just check the box for Website and then the Go To App button will take users directly to your site. Be aware that if you do this you lose the ability to use a few important API features such as Bookmarks and Requests.

Facebook Request Dialog on Website

I saw this:
http://demo.vatlab.net/RequestDialog.aspx
How they do this? Is the "Facebook Request Dialog" can be in a regular website, not canvas?
I'm looking for solution like this for a couple of days.
Thanks
You can use the dialog anywhere, but users will always be brought back to your canvas app (or mobile app) - if you don't have a canvas app (or mobile app) they won't see the requests
http://vatlab.com/asp-net-facebook-controls/request-dialog
This is their tutorial on the subject.