Direct links to pages in Facebook iFrame application? - facebook

Is it possible to link directly to inner pages in a Facebook iFrame app?
For example, say my app lives at http://www.example.com/app. Can I have a link like http://apps.facebook.com/my_app/?id=256 which will navigate to somewhere like http://www.example.com/app/id/256 in my app that lives in the Facebook canvas?
I did a quick search around but didn't find anything, so if there's something already out there, please point me to it!

If your callback URL is set to http://fb.domain.com/ and your canvas URL to http://apps.facebook.com/domain_app/, navigating to http://apps.facebook.com/domain_app/hello will load http://fb.domain.com/hello. This holds true for querystring parameters as well.

Related

Get referring url to facebook iframe tab

Is it possible to get the referring URL to a Facebook page tab?
Right now the referring url is always http://static.ak.facebook.com/platform/page_proxy.php?v=5 and I can't find any documentation about this subject. Is facebook providing this param (I can't find it in the signed_request for example). or is there any workaround? for example would it work if i used a canvas app vs an iframe tab?
for example would it work if i used a canvas app vs an iframe tab?
Nope, the are both loaded in pretty much the same way.
If you have control over the links pointing to your canvas/page tab app, then you can add the "app_data" parameter to those links – that is passed through to your app when Facebook loads it – and then just evaluate that to differentiate between different points of origin.
If it’s about outside links from somewhere on the web – then there’s no way I know of to get an actual referrer, since it’s always Facebook “linking” to your app in the iframe.
Could be that there’s some info in your app’s insights, but I haven’t checked them out from that perspective yet.

How do you link to a page within a facebook iframe?

For example, I have the application starting at index.php. The user navigates to about.php within the iframe, likes that specific page and shares it. What would the structure of the url look like to take people clicking from their own timeline into that page of my iframe?
Thanks!
This depends, if you are on a FanPage it does not work (directly)
on a App Page its easy. You simpley dont link relative in your iframe, but outside to the facebook page itself, for this to work your Canvas url needs to be a directory.
Then you can link to ie. http://apps.facebook.com/yourcanvas/about.php (dont forget the target _top)
On a FanPage the only way i know is to use beside the tab setting, a canvas app page.
in your share code you set the app page as target (with parameter) and on the app page you set a session variable for the desired target and then redirect back to the fanpage.
on the fanpage you look if you have an target value in your session, if so redirect the user.

Facebook Like Button for facebook post's permalink

I want to make a Facebook Like Button for Facebook's individual page.
For example: http://www.facebook.com/michelleobama/posts/10150938120900578
I get the code from facebook developer's page, and put on it to a my html.
My html: http://dl.dropbox.com/u/188423/like.html
But raised a error.
So, I try to check the url by URL Linter.
It say "Facebook Can't Crawl Itself. Sorry!".
Dose it possible that I want to do?
Unfortunately Facebook won't scrape OG tags from Tab Apps. However you can let Facebook scrape Canvas apps (apps on apps.facebook.com). If you want to implement multiple Like buttons inside a Tab I recommend setting up simple HTML pages that include the appropriate OG tags as well as a redirect to your Tab in either a Canvas app (this way it feels like you're never leaving "The Facebook experience") or some external location (on your web server).

Deprecated FB 'Share' Button to Share FB Page w/ iFrame Content

I am building a tab for a Facebook page, and this tab contains the deprecated share button, outlined here - http://developers.facebook.com/docs/share/
By my understanding, the default functionality of this button is to share the URL of the page it currently lives on. But I don't want to share the url of the iFrame contents, but rather, the Facebook page, with whatever the user is currently viewing within that iFrame.
Currently, I have it hard coded to share the URL of the FB page itself but have been told by my boss that this is not what they want. The active page within the tab must also be shared along with it.
Hopefully I've made this clear enough. Thanks in advance for any help or consideration with this issue.
Cheers!
Since the various states of your app/tab are not affected by the parent document's URL, this isn't possible.

Can I embed my own page in a facebook app?

I want to embed a store locator in Facebook the way footlocker does.
Is it possible to just make a facebook app that serves my stand-alone store-locator page without having to re-write my store-locator page for facebook?
Any good guides/how-tos for serving a stand-alone page through a facebook app like this?
This is very common and easy to do. All you have to do is create a facebook application and point your "canvas url" to your store locator page. So for example, if your store locator is www.example.com/storelocator set your Facebook application's canvas url to that page. If you look at that footlocker app you can see that the url of the iframe is actually http://unlocked.footlocker.com/main_store_locator/
If I understand you correctly, you are looking for the canvas guide. According to the documentation you can show your page in an iframe inside a tab on your facebook page.
Unfortunately, no. When you add a FBML/iframe app to your Facebook page, Facebook loads the content, caches it, and injects it into the DOM; it does not actually load it in an iframe. As such, there are restrictions about which elements can be included (eg, only <body> content), how Javascript is used (external libraries require some tweaking), and any element that references an external source (eg, Flash loading content) must have the target domain whitelisted for your application. In short: it's a pain, but it can be done.