How to stay in fullscreen mode after clicking on rel="external" links? - facebook

I'm building a mobile web app that allow user to login through Facebook using openauth. There are no pop-up but Facebook will force you to go their page and redirect you back to the uri that you stated. Therefore, there are no ajax loading of the facebook mobile login page. That's why i put rel="external" at the anchor.
When I'm in the full screen mode, clicking on those links will automatically brings me to Safari. Thus leaving the full screen mode.
May I know is there anyway around this? or are there other method of logging into FB without redirecting?

<a target="_webapp" href='http://www.cnn.com">Cnn</a>
Change rel to target. Mission accomplished.

Related

Redirect Facebook App to Facebook Canvas App (Fluid width)

I'm having a mental meltdown with Facebook and the way it handles Apps and Canvas Apps (apps with fluid width).
I can't figure out how to get a Page Tab to link to a fluid app. You can see an example on Coca Cola's fan page.
https://www.facebook.com/cocacola > Coce Zone tab
First it loads normal blank app which reloads to fluid app.
I have looked at the redirect code and it seems to be a form that submits itself after the page is done loading. After a bit of research I figured out that Facebook creates that itself.
My Page App directs to here but console says this:
Refused to display 'https://apps.facebook.com/ford-koeajotalkoot/' in a frame because it set 'X-Frame-Options' to 'DENY'.
In the app settings below the Page Tab there's Page Tab URL. There you must put an url to file with the redirect. It can be as simple file as below:
<script>
top.location.href="https://apps.facebook.com/YOUR_CANVAS_URL/";
</script>
It will then redirect to your app.

Facebook App Redirect Top Level Frame

Is it possible to redirect the top level page from within the iframe of a facebook app?
I'm building a facebook application that will appear in a tab with the JS SDK. I've added a normal a tag that links to the facebook page of the company who's responsible for the app (https://www.facebook.com/) but when I click this link i get:
Refused to display 'https://www.facebook.com/Somersby?ref=ts&fref=ts' in a frame because it set 'X-Frame-Options' to 'DENY'.
It seems Facebook is blocking links in my application that redirect outside of the app's domain. Is there a way to redirect to the company page? Is there an API available to do this?
I misunderstood what was happening here. I forgot to add target="_top" to the link, so it was trying to change the source of the iframe, not the top level frame. It seems facebook can't be displayed in an iFrame, which was the source of the error message.

Publishing action for Canvas (iframe) apps

I've provided my canvas app with all required for publishing actions to Facebook. After I publish an action I have a message like "John made an action over {SomeObject}" in my timeline. Everything works OK but the {SomeObject} i click opens in a window, not in facebook iframe where my app usually works. The URL of this link is rendered like this:
https://www.facebook.com/connect/uiserver.php?app_id={my_app_id}&method=permissions.request&redirect_uri={my_object_url}&response_type=code&display=page&auth_referral=1&fb_private_mode_enc={some_text_string}
What should i do to make my clicked object open in facebook iframe, not window? Can i somehow change display=page to display=iframe in this URL?
Thanks!
I've been having this problem too - I'd like to be able to direct a user straight to my canvas app. Added to this, unless the meta in {my_object_url}'s HTML lines up with what Facebook expects to see, the link resolves to a "this app is having a problem" dialog.
A possible workaround for you, not so much a 100% answer: allow the redirect, but in the meta of the page being redirected to, do an HTML refresh back to the app canvas? This would redirect users back to the app.
If you needed to direct them to a specific page of the app, you could use an app_data signed request addition to the canvas-redirect URL.
Hope this helps. Not a silver bullet though.
PG

Facebook Page Tab/Facebook Canvas App/Fan Page

This all sounds confusing;
I have a Facebook Canvas App with the same name as the Fan Page. I would like to add an iFrame tab to the Fan Page to promote and link to the Canvas App. My question is do I have to create a new app for the iFrame tab, or do I open my app settings for the canvas app and add settings for a page tab as well in there. Facebook don;t seem to have much documentation and they are changing things for app profiles soon, so I want to make sure I keep my fans of the page.
Thanks in advance.
Basically it goes like this.
You have an iFrame app.
The iFrame app has a canvas which is where you load your html for your app from your webserver with whatever language you want (.NET, PHP etc)
Then you can add this iFrame app to your page.
When you go to http://apps.facebook.com/yourappname
You will be shown the app by itself. When you add it to your page and load it via the tab on the menu of your page it will show you the app within the space on your page (an iframe).
You can use code to detect whether you are on a page or not to display different things.

FacebookSDK-5.0.25.0 for a Iframe Canvas App, after autherization user is redirected to canvas page

I am working on web application with .net 3.5 using C# facebook SDK. Loading page inside Page Tab iframe with some information, and input button, on click of button i am doing auth.Authorize() with some permissions, FB Permission window opens fine, but once user click on allow button it is redirecting to application canvas page instead of Page tab.
Is there anything i am missing?
Regards
Imran
Answer is to set auth.ReturnUrlPath which will bring user back to selected tab in facebook page. If your application is being added to multiple pages, then you can find out current pageid from "signed request" and set correct ReturnUrlPath, and attach ?sk=app_YOUR_APP_ID as querystring to ReturnUrlPath so current tab will be selected. your return path will look something similar to : http://www.facebook.com/profile.php?id=YOUR_PAGE_ID&sk=app_YOUR_APP_ID (make sure you handle both http and https)
This worked for me, hopefully will work for someone too.
-Ims
Facebook C# SDK doesnt support tabs.
Only canvas apps are supported.